public function getLockScreen(Request $request) { $user = User::where('username', $request->username)->first(); if ($user) { return view('auth.lock')->with(compact('user')); } flash()->error($this->getFailedLoginMessage()); return redirect()->back(); }
public static function president() { return self::checkIfNull(User::where('type', 'president')->orderBy('created_at', 'desc')->first()); }