vengateshwaran's avatar

Laravel image upload to Storag path and I;m trying to storage the image into public path

I'm trying to store the iamge into public directory have error occure

This is the Error :

FatalThrowableError in CompanyController.php line 325: Call to a member function move() on null

This is my code :

    $getimageName = time() . '.' . $request->pic->getClientOriginalExtension(); 
        $request->file->move(public_path('image'), $s3_id);
0 likes
1 reply
mushood's avatar

Should it not be

 $request->pic->move(public_path('image'), $s3_id);

pic instead of file?

Please or to participate in this conversation.