title: Decrypt Laravel Password Reset Token
body: <p>I am writing a test that ensures that the password reset functionality of my application works. The password reset system was created using the <code>php artisan make:auth</code> command. In order to make the test pass I need to automate a GET request to <code>/password/reset/{$token}</code> where <code>$token</code> is the value stored in the <code>password_resets</code> table. Laravel stores the token like this:</p>
  
  <p><code>$2y$10$9grKb3c6.Toiv0kjUWbCUeT8Q8D.Fg2gZ/xDLGQUAkmdyHigmRkNW</code></p>
  
  <p>but when Laravel sends the password reset email to the user, the reset token looks like this in the email:</p>
  
  <p><code>382aa64567ecd05a774c2e4ebb199d3340a1424300707053354c749c10487594</code>.</p>
  
  <p>My GET request to <code>/password/reset/$2y$10$9grKb3c6.Toiv0kjUWbCUeT8Q8D.Fg2gZ/xDLGQUAkmdyHigmRkNW</code> fails due to the forward slash in the reset token. (<em>Right after the 'g2gZ'</em>)</p>
  
  <p>I tried using the helper function <code>decrypt()</code> but had no luck.</p>
  
  <p><strong>How can I convert the password reset token I pull from the <code>password_resets</code> table to match what Laravel sends to the user?</strong></p>
  
  <p><em>Not sure if this is relevant but I did upgrade my application from 5.3 to 5.4.</em></p>