src/Parameters.php
public function getInclude(array $available = [])
    {
        if ($include = $this->getInput('include')) {
            $relationships = explode(',', $include);

            $invalid = array_diff($relationships, $available);

            if (count($invalid)) {
                throw new InvalidParameterException(
                    'Invalid includes ['.implode(',', $invalid).']',
                    1,
                    null,
                    'include'
                );
            }

            return $relationships;
        }

        return [];
    }
public function getInclude(array $available = [])
    {
        if ($include = $this->getInput('include')) {
            $relationships = explode(',', $include);

            $invalid = array_diff($relationships, $available);

            if (count($invalid)) {
                throw new InvalidParameterException(
                    'Invalid includes ['.implode(',', $invalid).']',
                    1,
                    null,
                    'include'
                );
            }

            return $relationships;
        }

        return [];
    }
public function getInclude ( array $ available = [ ] ) { if ( $ include = $ this -> getInput ( 'include' ) ) { $ relationships = explode ( ',' , $ include ) ; $ invalid = array_diff ( $ relationships , $ available ) ; if ( count ( $ invalid ) ) { throw new InvalidParameterException ( 'Invalid includes [' . implode ( ',' , $ invalid ) . ']' , 1 , null , 'include' ) ; } return $ relationships ; } return [ ] ; }
Get the includes.

@param array $available

@throws \Tobscure\JsonApi\Exception\InvalidParameterException

@return array
Get the includes .