| 1 | <?php |
||
| 8 | class AuditableTraitObserver |
||
| 9 | { |
||
| 10 | /** |
||
| 11 | * Model's creating event hook. |
||
| 12 | * |
||
| 13 | * @param Model $model |
||
| 14 | */ |
||
| 15 | public function creating(Model $model) |
||
| 28 | |||
| 29 | /** |
||
| 30 | * Get authenticated user id depending on model's auth guard. |
||
| 31 | * |
||
| 32 | * @return int |
||
| 33 | */ |
||
| 34 | protected function getAuthenticatedUserId() |
||
| 38 | |||
| 39 | /** |
||
| 40 | * Model's updating event hook. |
||
| 41 | * |
||
| 42 | * @param Model $model |
||
| 43 | */ |
||
| 44 | public function updating(Model $model) |
||
| 52 | |||
| 53 | /** |
||
| 54 | * Model's deleting event hook |
||
| 55 | * |
||
| 56 | * @param Model $model |
||
| 57 | */ |
||
| 58 | public function deleting(Model $model) |
||
| 67 | } |
||
| 68 |