How to handle image preview on edit if the image is from relationship

In our setup, all images is stored in file tables for dynamic purposes.. the create is ok but on edit I want to show the stored image on that record relationship
public function photo(): \Illuminate\Database\Eloquent\Relations\BelongsTo
{
return $this->belongsTo(File::class, 'photo_file_id');
}
public function photo(): \Illuminate\Database\Eloquent\Relations\BelongsTo
{
return $this->belongsTo(File::class, 'photo_file_id');
}
This is the form
Forms\Components\FileUpload::make('photo')
->image()
->storeFiles(false)
->avatar()
->imageEditor(),
Forms\Components\FileUpload::make('photo')
->image()
->storeFiles(false)
->avatar()
->imageEditor(),
data in database
No description
0 Replies
No replies yetBe the first to reply to this messageJoin
Want results from more Discord servers?
Add your server