Conditions | 2 |
Paths | 2 |
Total Lines | 12 |
Code Lines | 9 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
61 | public function updated(Task $task) |
||
62 | { |
||
63 | if (Auth::check()) { |
||
64 | $username = Auth::user()->name; |
||
65 | } else { |
||
66 | $username = User::findOrFail($task->user_id)->name; |
||
67 | } |
||
68 | TaskEvent::create([ |
||
69 | 'time' => Carbon::now(), |
||
70 | 'task_name' => $task->name, |
||
71 | 'user_name' => $username, |
||
72 | 'type' => 'updated', |
||
73 | ]); |
||
80 |