Local de her şey çalışıyordu. Sunucuya yükledim ve resimler 404 geliyor.
Fakat sunucuya bakıyorum dosyayı yüklemiş.
Route web.php üzerinden bunu da denedim.
Route::get('/linkstorage', function () {
\Artisan::call('storage:link');
echo "İşlem tamam";
});
fakat hala 404 resim gelmiyor.
<img style="width: 270px; height: 289px;" src="{{ Storage::url($product->coverImage->file) }}" alt="image description">
bu şekilde html'de çağırıyorum.
Dosyanın yüklendiği klasör 'storage/app/public/images'
Filesystems.php bu şekilde yaptım;
'default' => env('FILESYSTEM_DRIVER', 'public'),
'disks' => [
'local' => [
'driver' => 'local',
'root' => storage_path('app/public'),
],
'public' => [
'driver' => 'local',
'root' => storage_path('app/public'),
'url' => env('APP_URL').'/storage',
'visibility' => 'public',
],
's3' => [
'driver' => 's3',
'key' => env('AWS_ACCESS_KEY_ID'),
'secret' => env('AWS_SECRET_ACCESS_KEY'),
'region' => env('AWS_DEFAULT_REGION'),
'bucket' => env('AWS_BUCKET'),
'url' => env('AWS_URL'),
'endpoint' => env('AWS_ENDPOINT'),
'use_path_style_endpoint' => env('AWS_USE_PATH_STYLE_ENDPOINT', false),
],
],