shareit/app/Http/Middleware/Locale.php

23 lines
376 B
PHP
Raw Permalink Normal View History

2018-09-27 01:52:43 +00:00
<?php
namespace App\Http\Middleware;
use App;
2018-09-27 01:52:43 +00:00
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'));
2018-09-27 01:52:43 +00:00
return $next($request);
}
}