I have stored the images inside the storage/app/public/student_img but am not able to fetch images using any method inside the blade.
my filesystem.php setting is
'public' => [
'driver' => 'local',
'root' => storage_path('app/public'),
'url' => env('APP_URL').'/storage',
'visibility' => 'public',
],
// this is the code
像這樣獲取影像src='storage/app/student_img/{{ $stud->photo }}'
Please help me.
uj5u.com熱心網友回復:
你有沒有跑過:
php artisan storage:link
然而?
如果您在 /storage/app/public/student_img 中有一個檔案夾用于保存上傳的檔案,那么您需要在 /public 檔案夾中放置一個指向該檔案夾的符號鏈接。
完成后,您可以使用以下命令在刀片模板中包含 /storage/app/public/student_img 檔案夾中的影像:
<img src="{{url('student_img/image.png')}}">
轉載請註明出處,本文鏈接:https://www.uj5u.com/shujuku/376472.html
上一篇:背景影像未在React中顯示
