shareit/app/Http/Middleware/Locale.php

22 lines
368 B
PHP
Raw Normal View History

2018-09-27 01:52:43 +00:00
<?php
namespace App\Http\Middleware;
use Closure;
class Locale
{
/**
* Handle an incoming request.
*
* @param \Illuminate\Http\Request $request
* @param \Closure $next
* @return mixed
*/
public function handle($request, Closure $next)
{
\App::setLocale(session('lang'));
return $next($request);
}
}