attempt(request(['email', 'password'])) == false) { return back()->withErrors([ 'message' => 'Podany adres email lub hasło jest nieprawidłowe, proszę spróbować ponownie.' ]); } elseif(auth()->user()->statusID == 1) { auth()->logout(); return back()->withErrors([ 'message' => 'Twoje konto zostało zawieszone.' ]); } return redirect()->to('/jednostka'); } public function destroy() { auth()->logout(); return redirect()->to('/login'); } }