Ejemplo n.º 1
0
 /**
  * Create a new user instance after a valid registration.
  *
  * @param  array $data
  * @return User
  */
 protected function create(array $data)
 {
     $user = User::create(['first_name' => $data['first_name'], 'second_name' => $data['second_name'], 'email' => $data['email'], 'verify_token' => str_random(60), 'password' => bcrypt($data['password'])]);
     flash()->success('success', 'You are now logged in');
     $user->roles()->attach(1);
     return $user;
 }
Ejemplo n.º 2
0
 /**
  * Show the form for creating a new resource.
  *
  * @return Response
  */
 public function create()
 {
     $users = User::all();
     return view('admin.store.create', compact('users'));
 }