private function isJsonRequestValid(Request $request, $methods)
    {
        $methods = $this->getMethods($methods);

        return ! (
            in_array($request->method(), $methods) &&
            ! $request->isJson()
        );
    }
private function isJsonRequestValid(Request $request, $methods)
    {
        $methods = $this->getMethods($methods);

        return ! (
            in_array($request->method(), $methods) &&
            ! $request->isJson()
        );
    }
private function isJsonRequestValid ( Request $ request , $ methods ) { $ methods = $ this -> getMethods ( $ methods ) ; return ! ( in_array ( $ request -> method ( ) , $ methods ) && ! $ request -> isJson ( ) ) ; }
Validate json Request.

@param  Request            $request
@param  string|array|null  $methods

@return bool
Validate json Request .