src/Http/Validation/Accept.php
public function validate(Request $request)
    {
        try {
            $this->accept->parse($request, $this->strict);
        } catch (BadRequestHttpException $exception) {
            if ($request->getMethod() === 'OPTIONS') {
                return true;
            }

            throw $exception;
        }
    }
public function validate(Request $request)
    {
        try {
            $this->accept->parse($request, $this->strict);
        } catch (BadRequestHttpException $exception) {
            if ($request->getMethod() === 'OPTIONS') {
                return true;
            }

            throw $exception;
        }
    }
public function validate ( Request $ request ) { try { $ this -> accept -> parse ( $ request , $ this -> strict ) ; } catch ( BadRequestHttpException $ exception ) { if ( $ request -> getMethod ( ) === 'OPTIONS' ) { return true ; } throw $ exception ; } }
Validate the accept header on the request. If this fails it will throw
an HTTP exception that will be caught by the middleware. This
validator should always be run last and must not return
a success boolean.

@param \Illuminate\Http\Request $request

@throws \Exception|\Symfony\Component\HttpKernel\Exception\BadRequestHttpException

@return bool
Validate the accept header on the request . If this fails it will throw an HTTP exception that will be caught by the middleware . This validator should always be run last and must not return a success boolean .