jeudi 30 mars 2017

Laravel Middleware & Service Provider flow

I have a Laravel 5.4 app where I set the Locale of the app in a middleware, depending on the root domain, because I have a domain for each language. This is because of SEO & Adwords stuff, I can't change that.

Secondly I have a ViewComposerServiceProvider where I prepare Data for the Layout View. This data depends on the Language, but the language hasn't been set yet, because the ServiceProvider is executed first.

What should I do?



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire