Ad

404 In Routes.php With Laravel 5

- 1 answer

I have a route that I have recently change to:

Route::get('/tournaments/{{tournamentId}}/invite/{token}', '[email protected]');

When I try to access it with

http://laravel.dev:8000/tournaments/1/invite/ad5a5sd

I get a 404...

All my others routes work fine...

Any idea what could be the problem??

Ad

Answer

It's a small error (easy to overlook), but you shouldn't be using double curly braces. {{tournamentId}} should be {tournamentId} so the route should be:

Route::get('/tournaments/{tournamentId}/invite/{token}', '[email protected]');
Ad
source: stackoverflow.com
Ad