laravel-localization icon indicating copy to clipboard operation
laravel-localization copied to clipboard

Translatable nested resources

Open janmoes96 opened this issue 4 years ago • 0 comments

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!

janmoes96 avatar Jul 27 '20 13:07 janmoes96