Skip to content

PHP code snippet – How uplpoad video in laravel?

<?php
namespace App\Http\Controllers;

use Illuminate\Support\Facades\Request;


class UploadController extends Controller
{

    public function upload(Request $request)
    {

        if(Request::hasFile('file')){

            echo 'Uploaded';
            $file = Request::file('file');
            $file->move('uploads', $file->getClientOriginalName());
            echo '$file' . $file->getClientOriginalName() . '"/>';
        }

    }
}
See also  How to convert epoch time to date in Java?

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.