middleware('teacher.guest'); } public function showLinkRequestForm() { return view('auth_supervisor.passwords.email'); } public function broker() { return Password::broker('users'); } public function sendResetSupervisorLinkEmail(Request $request){ $request->validate([ 'email'=>'required|email|exists:users' ]); $supervisor= User::where('email', $request->email)->first(); if (empty($supervisor)) { return back()->with('error','Unknown Email address!'); } if($supervisor->apply_status == 0){ return back()->with('error', 'Your account is still under review'); }else{ \Mail::to( $request->email )->send( new \App\Mail\SupervisorPasswordResetLink($supervisor) ); return back()->with('success', 'Your password reset link sent to registered emails inbox.'); } } }