1) php artisan make:provider LangProvider
2) подключить provider config/app.php
public function boot(){
View::composer();
View::composer('layouts.app', 'App\Providers\ViewComposers\LangComposer');
}
3) ViewComposers\LangComposer.php
class LangComposer {
public function compose(View $view){
$lang = App\getLocale();
$view->with('lang', $lang);
}
}
4) {{$lang}}