What we want to do is to set the locales of a laravel 5.6 application, by depending of the language of the authenticated user.
We store the language preferences of a user on the database, in the users
table.
Create a new Middleware:
php artisan make:middleware AuthUserSetLocale