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'); } }
public function delete($id) { User::destroy($id); return redirect(url("/users")); }