Conditions | 2 |
Paths | 2 |
Total Lines | 16 |
Code Lines | 9 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
58 | private function logEvent($event, BaseModel $model) |
||
59 | { |
||
60 | $user = Auth::getUser(); |
||
61 | |||
62 | if (!is_null($user)) { |
||
63 | |||
64 | Log::create([ |
||
65 | 'action' => $event, |
||
66 | 'entity_id' => $model->id, |
||
67 | 'entity_type' => get_class($model), |
||
68 | 'state' => $model->toJson(), |
||
69 | 'created_by' => $user->id, |
||
70 | ]); |
||
71 | |||
72 | } |
||
73 | } |
||
74 | } |