mirror of
https://github.com/brunofontes/shareit.git
synced 2024-11-24 20:26:02 +00:00
Bruno Fontes
8157a183c7
I was using "\App::setLocale" on code, but it was annoind me. So I included the "use App" and now I am colling directly the "App::setLocale".
23 lines
376 B
PHP
23 lines
376 B
PHP
<?php
|
|
|
|
namespace App\Http\Middleware;
|
|
|
|
use App;
|
|
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);
|
|
}
|
|
}
|