laravel-ardent / ardent

Self-validating, secure and smart models for Laravel's Eloquent ORM
BSD 3-Clause "New" or "Revised" License
1.39k stars 211 forks source link

How to access $this->id in afterCreate() hook? #302

Open Nixtren opened 7 years ago

Nixtren commented 7 years ago

Hi people,

Is there any way to access $this->id in afterCreate() hook? I need to get the ID of the currently created row.

Thanks in advance!