I have successfully deployed my laravel application on a shared server. When i run code on localhost everything is okay. Everything looks great except the fact that I am unable to upload the images that are being uploaded to the/public_html/img/avatars/.
```
//this is how i store my images
...
if ($request->hasFile('avatar'))
{
$user = User::find(Auth::user()->id);
$avatar = $request->file('avatar'); // in here
$filename = time() . '.' . $avatar->getClientOriginalName();
$path = 'img/avatars';
$avatar->move($path, $filename);
$user->avatar = $filename;
$user->save();
}
// this is my filesystems.php config
...
'public' => [
'driver' => 'local',
'root' => public_path('app/public_html/'),
'url' => env('APP_URL').'/storage',
'visibility' => 'public',
],
...
Any idea to solve this problem? Thank you.