first commit

This commit is contained in:
Kevin Adametz 2021-01-08 17:48:20 +01:00
commit 0baac018a2
1011 changed files with 145854 additions and 0 deletions

View file

@ -0,0 +1,30 @@
<?php
namespace App\Http\Middleware;
use Carbon;
use Closure;
use Auth;
class Localization
{
/**
* Handle an incoming request.
*
* @param \Illuminate\Http\Request $request
* @param \Closure $next
* @return mixed
*/
public function handle($request, Closure $next)
{
if ( \Session::has('locale')) {
\App::setLocale(\Session::get('locale'));
Carbon::setLocale(\Session::get('locale'));
}
return $next($request);
}
}