Closed criting closed 2 years ago
Hi @criting,
This is old Laravel syntax.
You can achieve it this way:
Route::multilingual('food', 'FoodController@index')->name('food:list');
Which will generate {$locale}.food:list
as a route.
You can then confirm with php artisan route:list
command.
Describe the bug
Using 'as' in the route doesn't work and the blade file cannot find it. Example
Route::multilingual('food', ['as' => 'food:list', 'uses' => 'FoodController@index']);
Getting Route [food:list] not defined. error
Shouldn't this work by default? it is only used so we don't need to change the route url in the blade files, but actually calling them by unique name.