| Conditions | 3 |
| Paths | 8 |
| Total Lines | 10 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 43 | public function handle() |
||
| 44 | { |
||
| 45 | try { |
||
| 46 | $id = $this->argument('id') ? $this->argument('id') : $this->askForTasks(); |
||
| 47 | $task = Task::findOrFail($id); |
||
| 48 | $task->delete(); |
||
| 49 | } catch (Exception $e) { |
||
| 50 | $this->error('Error'); |
||
| 51 | } |
||
| 52 | $this->info('Task has been deleted to database succesfully'); |
||
| 53 | } |
||
| 55 |