src/FractalTransformFactory.php
public function make(ResourceInterface $resource, SerializerAbstract $serializer, array $options = [])
    {
        $options = $this->parseOptions($options, $resource);

        return $this->manager->setSerializer($serializer)
            ->parseIncludes($options['includes'])
            ->parseExcludes($options['excludes'])
            ->parseFieldsets($options['fieldsets'])
            ->createData($resource)
            ->toArray();
    }
public function make(ResourceInterface $resource, SerializerAbstract $serializer, array $options = [])
    {
        $options = $this->parseOptions($options, $resource);

        return $this->manager->setSerializer($serializer)
            ->parseIncludes($options['includes'])
            ->parseExcludes($options['excludes'])
            ->parseFieldsets($options['fieldsets'])
            ->createData($resource)
            ->toArray();
    }
Transform the given resource, and serialize the data with the given serializer.

@param  \League\Fractal\Resource\ResourceInterface    $resource
@param  \League\Fractal\Serializer\SerializerAbstract $serializer
@param  array                                         $options
@return array|null