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=public6 Replies
Did you run php artisan storage:link ?
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">
You didn't set
->disk()
on ImageEntryImageEntry::make('driver.photo')
->disk('public')
->label('Driver image'),
** The error remains the sameDoes this not work because it uses relationship?
Did you change the
filesystems.default
config? Because usually it's local
Shouldn't matter