| Total Complexity | 4 |
| Total Lines | 26 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 8 | class DeleteAdmin extends Command |
||
| 9 | { |
||
| 10 | |||
| 11 | protected $signature = 'panel:remove {user} {--f|force}'; |
||
| 12 | protected $description = 'Remove an admin with user id'; |
||
| 13 | |||
| 14 | public function handle() |
||
| 15 | { |
||
| 16 | $user = $this->argument('user'); |
||
| 17 | |||
| 18 | if($this->askResult($user)){ |
||
| 19 | UserProviderFacade::deleteAdmin($user); |
||
| 20 | $this->info('Admin was removed successfully'); |
||
| 21 | return; |
||
| 22 | } |
||
| 23 | |||
| 24 | $this->warn('Process was canceled'); |
||
| 25 | } |
||
| 26 | |||
| 27 | public function askResult($user) |
||
| 34 | } |
||
| 35 | } |
||
| 36 |