laravel-localization
laravel-localization copied to clipboard
Translatable nested resources
Hey there, i'm using your package to translate my routes. I figured out that i can even easily translate a resource route by doing
Route::resource(LaravelLocalization::transRoute('routes.posts') , 'PostController');
But i also have a nested controller called PostTranslationController, which is included in the web.php file like:
Route::resource('posts.posttranslations', 'PostTranslationController');
the first parameter post.posstranslations
makes sure the controller is nested, and that it create url like /post/{post}/translation/{id}
etc.
I hope there is a translation option for nested resource urls!