Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Translatable nested resources #734

Open
janmoes96 opened this issue Jul 27, 2020 · 0 comments
Open

Translatable nested resources #734

janmoes96 opened this issue Jul 27, 2020 · 0 comments

Comments

@janmoes96
Copy link

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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant