Level 102
What line is throwing that error?
when I upload video file,
The file "C:\xampp\tmp\php587C.tmp" does not exist
error occur. here is my controller codes
elseif ($request->media_type == 'upload') {
if (\Illuminate\Support\Facades\Request::hasFile('video_file')) {
$file = \Illuminate\Support\Facades\Request::file('video_file');
$filename = time() . '-' . $file->getClientOriginalName();
$size = $file->getSize() / 1024;
$path = public_path() . '/storage/uploads/';
$file->storeAs($path, $filename);
$video_id = $filename;
$url = asset('storage/uploads/' . $filename);
$media = Media::where('type', '=', $request->media_type)
->where('model_type', '=', 'App\Models\Lesson')
->where('model_id', '=', $course->id)
->first();
;
}
config filesystem.php
'disks' => [
'local' => [
'driver' => 'local',
'root' => public_path('app'),
],
what wrong in this codes
Please or to participate in this conversation.