image not show. please help

ImageEntry::make('driver.photo') ->label('Driver image'), // User model public function driver(): HasOne { return $this->hasOne(Driver::class); } // .env APP_URL=http://localhost:8000 FILESYSTEM_DISK=public FILAMENT_FILESYSTEM_DISK=public
No description
No description
6 Replies
Andi
Andi4mo ago
Did you run php artisan storage:link ?
shashika
shashikaOP4mo ago
yes this code working on blade. <img src="{{ Storage::disk(config('filesystems.default'))->url(App\Enums\FilePath::DRIVER_PHOTO->value . Auth::user()->driver->photo) . '?timestamp=' . time() }}" alt="Driver Photo" class="object-cover w-20 h-20 rounded-full">
Dennis Koch
Dennis Koch4mo ago
You didn't set ->disk() on ImageEntry
shashika
shashikaOP4mo ago
ImageEntry::make('driver.photo') ->disk('public') ->label('Driver image'), ** The error remains the same
No description
shashika
shashikaOP4mo ago
Does this not work because it uses relationship?
Dennis Koch
Dennis Koch4mo ago
Did you change the filesystems.default config? Because usually it's local Shouldn't matter

Did you find this page helpful?