First Commit

This commit is contained in:
Kevin Adametz 2018-10-29 09:39:31 +01:00
commit 610aa1e202
4204 changed files with 636764 additions and 0 deletions

View file

@ -0,0 +1,30 @@
<?php
namespace App\Http\Middleware;
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'));
// You also can set the Carbon locale
//Carbon::setLocale(\Session::get('locale'));
}
return $next($request);
}
}