0
votes

I put the Laravel auth in a subdomain with a variable slug.

When I submit Reset Password I get the error

Missing required parameters for [Route: password.reset] [URI: password/reset/{token}]

Route::domain('{business_slug}.' . env('APP_URL'))->middleware(['business.slug'])->group(function () {
    Auth::routes();
});
public function showLinkRequestForm($business_slug)
{
    return view('auth.passwords.email', ['business_slug' => $business_slug]);
}
{{ route('password.email', ['business_slug' => $business_slug]) }}
1
{token} is the missing parameter. What's the URL are you trying to send?senty
@senty http://jurdekker.onlineroosters.test/password/emailJur Dekker
You seem like your url is http://jurdekker.onlineroosters.test/password/reset/{token} and token in url is missing in your instancesenty

1 Answers

1
votes

The Reset Password cycle is:

The Auth::routes() routes are like this:

// 1) Show I forget password page
Route::get('/password/reset', 'Auth\ForgetPasswordController@showLinkRequestForm')
      ->name('password.request');

// 2) Send the reset link to user's email
Route::post('/password/email', 'Auth\ForgetPasswordController@sendResetLinkEmail')
     ->name('password.email');

// At this point, you should receive an email with a url looking like:
// example.com/reset/password/123123
// where 123123 is your {token}

// 3) From that link in the email, show reset password page
Route::get('password/reset/{token}', 'Auth\ResetPasswordController@showResetForm')
       ->name('password.reset');

// 4) Reset the password
Route::post('password/reset', 'Auth\ResetPasswordController@reset');

You can also try php artisan route:list to see all your routes.


Edit: I think it's related with the url you get in your email. In your .env file, make sure APP_URL is right; in your case:

APP_URL=http://jurdekker.onlineroosters.test