Exemplo n.º 1
0
 /**
  * Execute the console command.
  *
  * @return mixed
  */
 public function fire()
 {
     $name = $this->ask('Name : ');
     $email = $this->ask('Email : ');
     $password = $this->secret('Password : '******'name', 'email', 'password'));
     $this->line('Select role:');
     foreach (Role::all() as $role) {
         $this->line($role->id . '. ' . $role->name);
     }
     $role = $this->ask('Role number : ');
     $user->addRole($role);
     $this->info("User [{$user->name}] created successfully.");
 }
Exemplo n.º 2
0
 public function compose($view)
 {
     $roles = Role::lists('name', 'id');
     $view->with(compact('roles'));
 }