Retrieving created user instance
How can i retrieve a created model in CreateRecord lifecycle? for context, i wanna get the model id to generate relations data
3 Replies
with a closure calling $record. But it depends exactly where and what part of the lifecycle.
Check the lifecycle hooks. I think you should be able to access
$this->record->id
after saving https://filamentphp.com/docs/2.x/admin/resources/creating-records#lifecycle-hooksFilament
Creating records - Resources - Admin Panel - Filament
The elegant TALL stack admin panel for Laravel artisans.
ohhh maybe i'll try $this->record->id in afterCreate()
thanks