I have a function in controller
public function upload(Request $request)
{
$file = $request->file('File');
$destinationPath = 'uploads';
$file->move($destinationPath,$file->getClientOriginalName());
}
if i send the $request in log it shows something like this
array (
'_id' => 'tuYDOc644W6DDgAS',
'_token' => 'FerVRJvJWtnzv91TGuFRpIeT173aD9pH2o9Pqcu9',
'upload_column' => 'File',
'id' => 'WU_FILE_0',
'name' => '134772132_217259409961521_6013657189083751736_o.jpg',
'type' => 'image/jpeg',
'lastModifiedDate' => '2/7/2021, 6:44:12 AM',
'size' => '629882',
'_file_' =>
Illuminate\Http\UploadedFile::__set_state(array(
'test' => false,
'originalName' => '134772132_217259409961521_6013657189083751736_o.jpg',
'mimeType' => 'image/jpeg',
'error' => 0,
'hashName' => NULL,
)),
)
but this is giving a "Call to a member function move() on null"
i am using laravel-admin package , how can i properly save file and get information about the file?