license = $license; } /** * Handle an incoming request. * * @param Request $request * @param Closure $next * * @return mixed */ public function handle($request, Closure $next): mixed { if ($this->license->valid() || !$this->license->shouldCreateLicense()) { return redirect()->intended('/admin'); } return $next($request); } }