diff --git a/skolehjem/app/Http/Controllers/UserController.php b/skolehjem/app/Http/Controllers/UserController.php index 85613b3..f84a7cf 100644 --- a/skolehjem/app/Http/Controllers/UserController.php +++ b/skolehjem/app/Http/Controllers/UserController.php @@ -211,8 +211,17 @@ class UserController extends Controller return Response::detect('users.forgot'); } - public function forgot(){ + public function forgot(Request $request){ + $user = User::query()->where('email', '=', $request->email)->first(); + if($user == null){ + return redirect()->back(); + } + + //Send email + //TODO: Implement mail. + + return redirect()->route('users.login'); }