Exemplo n.º 1
0
 /**
  * Store a newly created resource in storage.
  *
  * @param  \Illuminate\Http\Request  $request
  * @return \Illuminate\Http\Response
  */
 public function store(Request $request)
 {
     $user = User::create(['username' => $request['username'], 'password' => bcrypt($request['password']), 'firstname' => $request['first'], 'lastname' => $request['last'], 'email' => $request['email'], 'cod_curso' => $request['grade'], 'id_school' => $request['schools'], 'pass' => $request['password']]);
     $user->roles()->attach(2);
     Session::flash('message-success', 'Se ha creado un nuevo usuario');
     return Redirect::to('/login/create');
 }
Exemplo n.º 2
0
 /**
  * Store a newly created resource in storage.
  *
  * @param  \Illuminate\Http\Request  $request
  * @return \Illuminate\Http\Response
  */
 public function store(Request $request)
 {
     \Notas\User::create(['name' => $request['name'], 'email' => $request['email'], 'password' => bcrypt($request['password'])]);
     return view('user.profile');
 }
Exemplo n.º 3
0
 /**
  * Create a new user instance after a valid registration.
  *
  * @param  array  $data
  * @return User
  */
 protected function create(array $data)
 {
     return User::create(['name' => $data['name'], 'email' => $data['email'], 'password' => bcrypt($data['password'])]);
 }
Exemplo n.º 4
0
 /**
  * Create a new user instance after a valid registration.
  *
  * @param  array  $data
  * @return User
  */
 protected function create(array $data)
 {
     return User::create(['username' => $data['username'], 'password' => $data['password']]);
 }