@@ 42-46 (lines=5) @@ | ||
39 | ||
40 | $authModel = config('auth.model'); |
|
41 | ||
42 | if ((new $authModel())->create(['name' => $name, 'email' => $email, 'password' => bcrypt($password)])) { |
|
43 | $this->info('All done!'); |
|
44 | ||
45 | return; |
|
46 | } |
|
47 | ||
48 | $this->error('Something went wrong... Please try again.'); |
|
49 | } |
@@ 49-53 (lines=5) @@ | ||
46 | ||
47 | $authModel::unguard(); |
|
48 | ||
49 | if ((new $authModel())->create(['name' => $name, 'email' => $email, 'password' => bcrypt($password), 'is_admin' => true])) { |
|
50 | $this->info('All done!'); |
|
51 | ||
52 | return; |
|
53 | } |
|
54 | ||
55 | $authModel::reguard(); |
|
56 |