mirror of
				https://github.com/brunofontes/shareit.git
				synced 2025-10-31 10:01:06 -03:00 
			
		
		
		
	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);
 | |
|     }
 | |
| }
 |