for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace Microboard\Http\Middleware;
use Closure;
use Illuminate\Http\Request;
class Localization
{
/**
* Handle an incoming request.
*
* @param Request $request
* @param Closure $next
* @return mixed
*/
public function handle($request, Closure $next)
if (session()->has('locale')) {
app()->setLocale(session()->get('locale'));
}
return $next($request);