有没有办法创建带有前缀的路由,这样我就可以拥有这样的路由
/articles.html -> goes to listing Controller in default language
/en/articles.html -> goes to the same controller
/fr/articles.html -> goes to the same controller
我目前的问题是通过这样做:
Route::group(['prefix=>'/{$lang?}/',function(){});
像这样的路线:/authors/author-100.html
将匹配前缀 'authors` ,并且肯定没有称为“authors”的语言。
我使用 laravel 5.5