| Conditions | 4 |
| Paths | 12 |
| Total Lines | 12 |
| Code Lines | 9 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 2 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 40 | public function handle() |
||
| 41 | { |
||
| 42 | try { |
||
| 43 | $id = $this->argument('id') ? $this->argument('id') : $this->ask('Event id?'); |
||
| 44 | $count = Task::destroy($id); |
||
| 45 | } catch (Exception $e) { |
||
| 46 | $this->error('error'.$e); |
||
| 47 | } |
||
| 48 | if ($count == 0) { |
||
|
|
|||
| 49 | $this->alert('Task does not exist'); |
||
| 50 | } else { |
||
| 51 | $this->info('Task has been deleted to database succesfully'); |
||
| 52 | } |
||
| 55 |