| Conditions | 2 |
| Paths | 2 |
| Total Lines | 13 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 12 | public function handle(ManagedModel $model) |
||
| 13 | { |
||
| 14 | // For stateful transitions we will apply this deletion as a state |
||
| 15 | if($model instanceof StatefulContract) { |
||
| 16 | (new PageState($model))->apply('delete'); |
||
| 17 | $model->save(); |
||
| 18 | } |
||
| 19 | |||
| 20 | Audit::activity() |
||
| 21 | ->performedOn($model) |
||
| 22 | ->log('deleted'); |
||
| 23 | |||
| 24 | $model->delete(); |
||
| 25 | } |
||
| 27 |