Conditions | 5 |
Paths | 2 |
Total Lines | 13 |
Code Lines | 8 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
39 | public function handle() |
||
40 | { |
||
41 | try { |
||
42 | User::create([ |
||
43 | 'name' => $this->argument('name') ? $this->argument('name') : $this->ask('User name?'), |
||
44 | 'email' => $this->argument('email') ? $this->argument('email') : $this->ask('User email?'), |
||
45 | 'password' => $this->argument('password') ? $this->argument('password') : $this->ask('User password?'), |
||
46 | ]); |
||
47 | } catch (Exception $e) { |
||
|
|||
48 | $this->error('error'.$e); |
||
49 | } |
||
50 | |||
51 | $this->info('User has been added to database succesfully'); |
||
52 | } |
||
54 |