My uploaded file(abc.png) is being saved in the folder storage\app\public\uploaded_files\abc.png
When I use $url = Storage::disk('public')->url($business->logo);
it generates http://127.0.0.1:8000//storage/abc.png
which rather opens a URL related to a route. In filesystem.php I have the following entry.
'public' => [
'driver' => 'local',
'root' => storage_path('app/public'),
'url' => env('APP_URL').'/storage',
'visibility' => 'public',
],
Route is given below: Route::get( '/{business_slug}/{item_name}-{encoded_id}', 'ItemController@single' )->name( 'single_item' );
What should I do to fix the image URL and make it available publicly?
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire