예제 #1
0
 public function update(Request $request, $id)
 {
     $user = User::find($id);
     $user->fill($request->all());
     $user->save();
     Session::flash('message', 'Usuario editado correctamente.');
     return Redirect::to('/show-user');
 }
예제 #2
0
 public function edit($id)
 {
     $renta = new Renta();
     $bodega = Bodega::find($id);
     $cliente = User::find(Auth::user()->id);
     $renta->user_id = $cliente->id;
     $renta->bodega_id = $bodega->id;
     $bodega->estatus = 0;
     $renta->save();
     $bodega->save();
     Session::flash('success', '');
     return Redirect::to('warehouse-list');
 }
예제 #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'])]);
 }