src/Http/Middleware/NegotiateContent.php
protected function isExpectingContent($request): bool
    {
        $methods = $this->route->isNotRelationship() ? ['POST', 'PATCH'] : ['POST', 'PATCH', 'DELETE'];

        return \in_array($request->getMethod(), $methods);
    }
protected function isExpectingContent($request): bool
    {
        $methods = $this->route->isNotRelationship() ? ['POST', 'PATCH'] : ['POST', 'PATCH', 'DELETE'];

        return \in_array($request->getMethod(), $methods);
    }
protected function isExpectingContent ( $ request ) : bool { $ methods = $ this -> route -> isNotRelationship ( ) ? [ 'POST' , 'PATCH' ] : [ 'POST' , 'PATCH' , 'DELETE' ] ; return \ in_array ( $ request -> getMethod ( ) , $ methods ) ; }
Is data expected for the supplied request?

If the JSON API request is any of the following, a JSON API document
is expected to be set on the request:

- Create resource
- Update resource
- Replace resource relationship
- Add to resource relationship
- Remove from resource relationship

@param Request $request
@return bool
Is data expected for the supplied request?