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