public function handle($request, Closure $next)
    {
        $type = 'laravel';
        if ($this->cors->isPreflightRequest($type, $request)) {
            $this->cors->setRequest($type, $request);
            $this->cors->setResponse($type, $response = new Response());
            $this->cors->handle();

            // Set Preflight response status code.
            $response->setStatusCode(204);

            return $response;
        }

        return $next($request);
    }