lundi 27 août 2018

Laravel route with where clause not working as expected

I've got the following routes, which both work fine:

Route::get('/de', 'FrontpageController@index');

Route::get('/fr', 'FrontpageController@index');

The plan was to combine them into one statement, like described in this apparently working solution: https://stackoverflow.com/a/34404404/4688612

So the new code looks like this:

Route::get('/{url}', 'FrontpageController@index')->where('url', 'de|fr');

But, I get This page isn’t working. example.test redirected you too many times.

What am I not getting here?



from Newest questions tagged laravel-5 - Stack Overflow https://ift.tt/2MAV8lW
via IFTTT

Aucun commentaire:

Enregistrer un commentaire