I'm trying to display an image stored in my Storage folder but it showing a broken link icon. Here's the controller
`public function getUserImage($filename)
{
$file = Storage::disk('public')->get($filename);
return new Response($file, 200);
}`
Here is the img src in my view
<img src="" alt="" class="img-responsive">
Here is my route code
Route::get('/user/{filename}',[ 'uses' => 'UserController@getUserImage', 'as' => 'account.image' ]);
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire