Conditions | 2 |
Paths | 2 |
Total Lines | 12 |
Code Lines | 9 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
42 | public function deleted(Task $task) |
||
43 | { |
||
44 | if (Auth::check()) { |
||
45 | $username = Auth::user()->name; |
||
46 | } else { |
||
47 | $username = User::findOrFail($task->user_id)->name; |
||
48 | } |
||
49 | TaskEvent::create([ |
||
50 | 'time' => Carbon::now(), |
||
51 | 'task_name' => $task->name, |
||
52 | 'user_name' => $username, |
||
53 | 'type' => 'deleted', |
||
54 | ]); |
||
80 |