How do Custom Components actually work? Can someone explain it to me?
Hi guys, I'm working on a custom component for the form of my "Video" resource.
Problem: I get the following error:
Undefined variable $record
I started to create a custom layout via php artisan make:form-layout BunnyVideo
. The Blade looks like this:
In addition I have this BunnyVideo Class:
I use the BunnyVideo component like this in the form function of the VideoResource: BunnyVideo::make('key'),
4 Replies
May be need {{ ...}} on record, not only one {
<iframe src="https://iframe.mediadelivery.net/embed/249784/{{ $record->key }}" width="640" height="360" allowfullscreen></iframe>
You need to use $getRecord()
too, mdr π
Thank you guys!