Conditions | 2 |
Paths | 2 |
Total Lines | 21 |
Code Lines | 11 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
39 | public function handle() |
||
40 | { |
||
41 | // Authorization Password |
||
42 | $authorization_password = $this->secret('Enter Authorization Password To Continue'); |
||
43 | |||
44 | if (MakeSuperAdmin::checkAuthorization($authorization_password)) { |
||
45 | $this->info('Authorization Granted.'); |
||
46 | // Asking for name |
||
47 | $name = $this->ask('Enter Super Admin Name'); |
||
48 | // Asking for Email |
||
49 | $email = $this->ask('Enter Super Admin Email'); |
||
50 | // Asking for Password |
||
51 | $password = $this->secret('Enter Super Admin Password'); |
||
52 | |||
53 | $this->info('Creating Super Admin ......'); |
||
54 | |||
55 | MakeSuperAdmin::make($name, $email, $password); |
||
56 | |||
57 | $this->info('Super Admin Created Successfully'); |
||
58 | } else { |
||
59 | $this->error('Authorization password is wrong'); |
||
60 | } |
||
63 |