F
Filamentβ€’11mo ago
thedangler

Show image from url in the edit resource page form

In my form I have all the information I need to change but I want to show the image which the information pertains to. The image is from an outside url. I was able to show the image in the table. Wondering how I can show NOT edit the image from an url in the form. Its so the admins have context to what image they are adding information too.
Solution:
Placeholder::make('my_image')->content(fn($record) => $record ? new HtmlString('<img src=" ' . $record->my_outside_image . '" />') : '')
Placeholder::make('my_image')->content(fn($record) => $record ? new HtmlString('<img src=" ' . $record->my_outside_image . '" />') : '')
...
Jump to solution
3 Replies
Solution
toeknee
toekneeβ€’11mo ago
Placeholder::make('my_image')->content(fn($record) => $record ? new HtmlString('<img src=" ' . $record->my_outside_image . '" />') : '')
Placeholder::make('my_image')->content(fn($record) => $record ? new HtmlString('<img src=" ' . $record->my_outside_image . '" />') : '')
thedangler
thedanglerOPβ€’11mo ago
I'll give that a shot thanks! Filament docs are decent but I'm still googling things
toeknee
toekneeβ€’11mo ago
Theres just too much to cover tbh, so many scenarios which are possible πŸ™‚
Want results from more Discord servers?
Add your server