ask('What is the name?'); $email = $this->ask('What is the email?'); $role = $this->ask('What is the role 1 (SuperAdmin) or 2 (Admin) ?') == '1' ? 1 : 2; $pwd = $this->secret('What is the password?'); $user = new User(); $user->name = $name; $user->email = $email; $user->role = $role; $user->password = Hash::make($pwd); $user->saveOrFail(); $this->info('User created.'); return 0; } }