Level 67
Use php artisan storage:link
https://laravel.com/docs/8.x/filesystem#the-public-disk
If you are storing client images, I would much better recommend using a service like Amazon S3 though.
Goodluck!
1 like
I would like an authenticated user to save their files in a directory attached to their user id or user name so far this is my uploads controller for the directory
public function upload(Request $request)
{
$this->validate($request, [
'file' => 'required|mimes:jpeg,jpg,png',
]);
$picName = time() . '.' . $request->file->extension();
$request->file->move(public_path('uploads/img/profiles'), $picName);
return $picName;
}
so intern i would like to have a directory after profiles to be the name or id of the user where they will store or upload their images or files. Please help
Please or to participate in this conversation.