How to give speciel permissions like 777 for public/images yes but most people working on linux etc
Here is my code
$user=$data['name'];
$imageName = $user . '_product.' .
$user->file('image')->getClientOriginalExtension();
$imageCompletePath = 'public/images/'. $imageName ;
$data->file('image')->move(
base_path() . '/public/images/', $imageName);
$user->update(array('image' => $imageCompletePath));
And is gives me this exception maybe because of special permissions
FatalErrorException in AuthController.php line 149:
Call to a member function file() on string
@Mubashar You are assigning a string value to $user:
$user=$data['name'];
Later on you are trying to call a method on that string:
$user->file('image')...
And that is what the error message is trying to tell you.
Please sign in or create an account to participate in this conversation.