protected function isRequestBodyACollection(Request $request)
    {
        $input = $request->input();

        // Check that the top-level of the body is an array
        if (is_array($input) && count($input) > 0) {

            // Check if the first element is an array (json object)
            $firstChild = array_shift($input);

            if (is_array($firstChild)) {
                return true;
            }
        }

        return false;
    }
protected function isRequestBodyACollection(Request $request)
    {
        $input = $request->input();

        // Check that the top-level of the body is an array
        if (is_array($input) && count($input) > 0) {

            // Check if the first element is an array (json object)
            $firstChild = array_shift($input);

            if (is_array($firstChild)) {
                return true;
            }
        }

        return false;
    }
protected function isRequestBodyACollection ( Request $ request ) { $ input = $ request -> input ( ) ; // Check that the top-level of the body is an array if ( is_array ( $ input ) && count ( $ input ) > 0 ) { // Check if the first element is an array (json object) $ firstChild = array_shift ( $ input ) ; if ( is_array ( $ firstChild ) ) { return true ; } } return false ; }
Check if this request's body input is a collection of objects or not

@return bool
Check if this request s body input is a collection of objects or not