protected function includedResourcesToArray(): array
    {
        $data = [];

        foreach ($this->includedResources as $resource)
        {
            $data[] = $resource->toArray();
        }

        return $data;
    }
protected function includedResourcesToArray(): array
    {
        $data = [];

        foreach ($this->includedResources as $resource)
        {
            $data[] = $resource->toArray();
        }

        return $data;
    }
protected function includedResourcesToArray ( ) : array { $ data = [ ] ; foreach ( $ this -> includedResources as $ resource ) { $ data [ ] = $ resource -> toArray ( ) ; } return $ data ; }
Cast included resources to an array

@return array
Cast included resources to an array