Conditions | 4 |
Paths | 8 |
Total Lines | 12 |
Code Lines | 8 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
37 | public function handle() |
||
38 | { |
||
39 | try { |
||
40 | $id = $this->argument('id') ? $this->argument('id') : $this->askForTasks(); |
||
41 | $task = Task::findOrFail($id); |
||
42 | $task->update([ |
||
43 | 'completed' => $task->completed?false:true, |
||
44 | ]); |
||
45 | } catch (Exception $e) { |
||
46 | $this->error('Error'); |
||
47 | } |
||
48 | $this->info('Task status has been edited to database succesfully'); |
||
49 | } |
||
51 |