Andrius
Andrius
FFilament
Created by Andrius on 1/23/2024 in #❓┊help
Access resource record/model in custom component registered via registerRenderHook
Only way I found to get current edit resource record ID (assuming that I hooked this component to certain Model) is like this:
$recordId = Route::getCurrentRoute()->parameter('record');
$record = Article::find($recordId);
$recordId = Route::getCurrentRoute()->parameter('record');
$record = Article::find($recordId);
Is there any other way to get record, or only this one ?
4 replies