I have a form that accepts 1 or more file uploads.
I defined a custom folder/filesystem:
'market' => [
'driver' => 'local',
'root' => storage_path('app/public/market/images'),
'url' => env('APP_URL').'/storage/market',
'visibility' => 'public',
'throw' => false,
],
In my controller I have:
$newName = $file->hashName();
$storedPath = $file->storePubliclyAs($file, $newName, 'market');
echo $storedPath;
}
The file that is being saved is going under 'tmp' folder instead of the exact folder mentioned. How do I store the file as defined in the controller?