Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

Error: Call to a member function getClientOriginalName() on null in file /usr/local/var/www/murabaha_backend/app/Http/Controllers/Traits/MediaUploadingTrait.php

$fileName = null;
        if($request->hasFile('image')){
            $photoFile = $request->file('image');
            $fileName = $photoFile->getClientOriginalName();
            Storage::putFileAs('public/photos',$photoFile, $fileName);
        }
 
PREVIOUS NEXT
Tagged: #Call #member #function #null #file
ADD COMMENT
Topic
Name
5+2 =