/**
  * Display the password reset view for the given token.
  *
  * If no token is present, display the link request form.
  *
  * @param  string|null  $token
  * @return \Illuminate\Http\Response
  */
 public function showResetForm($token = null)
 {
     if (is_null($token)) {
         return $this->getEmail();
     }
     /*
      * --------------------------------------------------------------------------
      * Checking password reset request token
      * --------------------------------------------------------------------------
      * Check if user has been creating request for changing their password
      * otherwise throw it 404 error page, then retrieve their profile to make
      * sure they are going to update the correct account.
      */
     $reset = DB::table('password_resets')->whereToken($token)->first();
     if ($reset == null) {
         abort(404);
     }
     $user = User::whereEmail($reset->email)->firstOrFail();
     return view('admin.auth.reset')->with(compact('token', 'user'));
 }