I'm trying to upload images to the storage/app/public/
folder that is linked to the public folder from Laravel. My filesystems.php
is configured this way:
'default' => env('FILESYSTEM_DRIVER', 'public')
//rest of the code
'public' => [
'driver' => 'local',
'root' => storage_path('app/public'),
'url' => env('APP_URL').'/storage',
'visibility' => 'public',
],
And at my controller, I upload the image:
$file = $request->hasFile('imagem');
$file = $request->file('imagem')->isValid();
$upload = $request->imagem->store('instituicoes');
I want the file to be uploaded to this path storage/app/public/instituicoes
but when I use this code Laravel creates the 'instituicoes' folder at the storage/app
folder, not at the storage/app/public/
that I defined as storage path.