Ejemplo n.º 1
0
 public function prosesLogin(LoginRequest $request)
 {
     $user = User::where("username", $_POST['username'])->where("password", $_POST['password'])->get();
     if ($user->count() == 0) {
         return redirect()->to('/abort');
     } else {
         \Auth::login($user->first());
         return redirect()->to('/success');
     }
 }
Ejemplo n.º 2
0
 public function delete($id)
 {
     User::destroy($id);
     return redirect(url("/users"));
 }