Task: It is necessary to determine the localization in the RegionMiddleware.php mediator and use it in controllers and in views.
RegionMiddleware.php
public function handle($request, Closure $next) { App::setLocale('ru'); return $next($request); } MainController.php
public function __construct() { $this->middleware('region'); } public function index() { echo App::getLocale();die; } Displays in this case the value that is written in the config file (en). What am I doing wrong?