Widget Owner

If I've got a table widget in a view page (ViewRecord)...how am I getting the model of the record I am viewing ? tried getOwnerRecord()
3 Replies
MikePageDev
MikePageDev2mo ago
You need to define the $record property.
public ?Model $record = null;
public ?Model $record = null;
Then you can access the model through $record
Matthew
MatthewOP2mo ago
Thanks, I'll have a go at that. Assume that delcaration is just going in the widget class ?
MikePageDev
MikePageDev2mo ago
Yes
Want results from more Discord servers?
Add your server