Skip to content
Advertisement

how to customize Auth::routes in laravel

I hope you are the best. I’m trying to create a multi-language feature in my Laravel app. but I don’t know how to insert Auth::routes in my web routes file to support my multi-language. this code works for me but Auth::routes links don’t set correctly. the app can identify target language but in Auth::routes() links arent’ correctly. for example, all the page is based on target language but links in the local language. (target is en_us but links in fa_IR)

JavaScript

Advertisement

Answer

You could group all your routes so all of them get locale as prefix:

JavaScript

This blog post seems to solve what you are trying to do:

https://laraveldaily.com/multi-language-routes-and-locales-with-auth/

User contributions licensed under: CC BY-SA
5 People found this is helpful
Advertisement