private function isFormRequest(Request $request)
    {
        $contentTypeParts = explode(';', $request->headers->get('Content-Type'));

        if (isset($contentTypeParts[0])) {
            return in_array($contentTypeParts[0], ['multipart/form-data', 'application/x-www-form-urlencoded']);
        }

        return false;
    }
private function isFormRequest(Request $request)
    {
        $contentTypeParts = explode(';', $request->headers->get('Content-Type'));

        if (isset($contentTypeParts[0])) {
            return in_array($contentTypeParts[0], ['multipart/form-data', 'application/x-www-form-urlencoded']);
        }

        return false;
    }
private function isFormRequest ( Request $ request ) { $ contentTypeParts = explode ( ';' , $ request -> headers -> get ( 'Content-Type' ) ) ; if ( isset ( $ contentTypeParts [ 0 ] ) ) { return in_array ( $ contentTypeParts [ 0 ] , [ 'multipart/form-data' , 'application/x-www-form-urlencoded' ] ) ; } return false ; }
Check if the content type indicates a form submission.

@param Request $request

@return bool
Check if the content type indicates a form submission .