dark_illusion_909099
dark_illusion_909099

Reputation: 1099

Laravel route not working for get request with parameters

This is my url :

http://localhost:8000/password-reset?token=$2y$10$N8AX4N9XMhP4NKPCK6NtjOvwoOzeWmaQnOJkxrKg4Ul7shNhp0zdu

This is how my route looks like:

Route::get('password-reset?token={token}', 'Auth\PasswordResetController@index');

However this is not getting captured in the controller.

Upvotes: 1

Views: 526

Answers (1)

Rouhollah Mazarei
Rouhollah Mazarei

Reputation: 4153

Change the route first part to password-reset (remove ?token={token}) and then in controller use request('token') to get the token value.

Upvotes: 2

Related Questions