/** * Handle an incoming request. * * @param \Illuminate\Http\Request $request * @param \Closure $next * @param string|null $guard * @return mixed */ public function handle($request, Closure $next, $guard = null) { $locale = $this->determinerManager->determineLocale($request); $this->app->setLocale($locale); return $next($request); }
public function testThatItReturnsADefaultDeterminer() { $manager = new DeterminerManager($this->app); $this->assertInstanceOf(Determiners\DeterminerInterface::class, $manager->driver()); }