title: Route [password.reset] not defined in laravel 5.4 in ResetPasswords.php
body: <p>I'm getting this error in my custom app:</p>
  
  <pre><code>InvalidArgumentException in UrlGenerator.php line 304: 
  Route [password.reset] not defined.
  </code></pre>
  
  <p>I know laravel provides a password reset functionality out of the box but I want to write my own class and routes.</p>
  
  <p><strong>Here is my routes in web.php</strong></p>
  
  <pre><code>// Password reset link request routes...
  Route::get('password/email', 'Auth\PasswordController@getResetEmail');
  Route::post('password/email', 'Auth\PasswordController@postResetEmail');
  
  // Password reset routes...
  Route::get('password/reset/{token}', 'Auth\PasswordController@getReset');
  Route::post('password/reset', 'Auth\PasswordController@postReset');
  </code></pre>
  
  <p><strong>And this is my PasswordController:</strong></p>
  
  <pre><code>namespace App\Http\Controllers\Auth;
  
  use App\Http\Controllers\Controller;
  use Illuminate\Contracts\Auth\Guard;
  use Illuminate\Contracts\Auth\PasswordBroker;
  use Illuminate\Foundation\Auth\ResetsPasswords;
  
  class PasswordController extends Controller {
  
  
  
      use ResetsPasswords;
  
      /**
       * Create a new password controller instance.
       *
       * @param  \Illuminate\Contracts\Auth\Guard  $auth
       * @param  \Illuminate\Contracts\Auth\PasswordBroker  $passwords
       * @return void
       */
      public function __construct(Guard $auth, PasswordBroker $passwords)
      {
          $this-&gt;auth = $auth;
          $this-&gt;passwords = $passwords;
          $this-&gt;middleware('guest');
      }
  }
  </code></pre>
  
  <p><strong>This is my ResetPasswords.php trait:</strong></p>
  
  <pre><code>namespace Illuminate\Foundation\Auth;
  
  use Illuminate\Http\Request;
  use Illuminate\Mail\Message;
  use Illuminate\Support\Facades\Auth;
  use Illuminate\Support\Facades\Password;
  use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
  
  trait ResetsPasswords
  {
      use RedirectsUsers;
  
      /**
       * Display the form to request a password reset link.
       *
       * @return \Illuminate\Http\Response
       */
      public function getResetEmail()
      {
          return view('public.auth.password');
      }
  
      /**
       * Send a reset link to the given user.
       *
       * @param  \Illuminate\Http\Request  $request
       * @return \Illuminate\Http\RedirectResponse
       */
      public function postResetEmail(Request $request)
      {
          $this-&gt;validate($request, ['email' =&gt; 'required|email']);
  
          $response = Password::sendResetLink($request-&gt;only('email'), function (Message $message) {
              $message-&gt;subject($this-&gt;getEmailSubject());
          });
  
          switch ($response) {
              case Password::RESET_LINK_SENT:
                  return redirect()-&gt;back()-&gt;with('status', trans($response));
  
              case Password::INVALID_USER:
                  return redirect()-&gt;back()-&gt;withErrors(['email' =&gt; trans($response)]);
          }
      }
  
      /**
       * Get the e-mail subject line to be used for the reset link email.
       *
       * @return string
       */
      protected function getEmailSubject()
      {
          return property_exists($this, 'subject') ? $this-&gt;subject : 'Your Password Reset Link';
      }
  
      /**
       * Display the password reset view for the given token.
       *
       * @param  string  $token
       * @return \Illuminate\Contracts\View\Factory|\Illuminate\View\View
       */
      public function getReset($token = null)
      {
          if (is_null($token)) {
              throw new NotFoundHttpException;
          }
  
          return view('public.auth.reset')-&gt;with('token', $token);
      }
  
      /**
       * Reset the given user's password.
       *
       * @param  \Illuminate\Http\Request  $request
       * @return \Illuminate\Http\RedirectResponse
       */
      public function postReset(Request $request)
      {
          $this-&gt;validate($request, [
              'token' =&gt; 'required',
              'email' =&gt; 'required|email',
              'password' =&gt; 'required|confirmed|min:6',
          ]);
  
          $credentials = $request-&gt;only(
              'email', 'password', 'password_confirmation', 'token'
          );
  
          $response = Password::reset($credentials, function ($user, $password) {
              $this-&gt;resetPassword($user, $password);
          });
  
          switch ($response) {
              case Password::PASSWORD_RESET:
                  return redirect($this-&gt;redirectPath())-&gt;with('status', trans($response));
  
              default:
                  return redirect()-&gt;back()
                              -&gt;withInput($request-&gt;only('email'))
                              -&gt;withErrors(['email' =&gt; trans($response)]);
          }
      }
  
      /**
       * Reset the given user's password.
       *
       * @param  \Illuminate\Contracts\Auth\CanResetPassword  $user
       * @param  string  $password
       * @return void
       */
      protected function resetPassword($user, $password)
      {
          $user-&gt;password = bcrypt($password);
  
          $user-&gt;save();
  
          Auth::login($user);
      }
  }
  </code></pre>
  
  <p>The problem is when I push the password reset form button it leads to that error.</p>
  
  <p>Any help would be appreciated...</p>