| Conditions | 3 |
| Paths | 1 |
| Total Lines | 14 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 35 | public static function boot() |
||
| 36 | { |
||
| 37 | parent::boot(); |
||
| 38 | |||
| 39 | self::creating(function ($model) { |
||
| 40 | if (Auth()->check()) { |
||
| 41 | $model->created_by = Auth()->user()->id; |
||
| 42 | $model->modifed_by = Auth()->user()->id; |
||
| 43 | } |
||
| 44 | }); |
||
| 45 | |||
| 46 | self::updating(function ($model) { |
||
| 47 | if (Auth()->check()) { |
||
| 48 | $model->modifed_by = Auth()->user()->id; |
||
| 49 | } |
||
| 53 |