src/Fractal.php
public function item($data, $transformer = null, $resourceName = null)
    {
        if (! is_null($resourceName)) {
            $this->resourceName = $resourceName;
        }

        return $this->data('item', $data, $transformer);
    }
public function item($data, $transformer = null, $resourceName = null)
    {
        if (! is_null($resourceName)) {
            $this->resourceName = $resourceName;
        }

        return $this->data('item', $data, $transformer);
    }
public function item ( $ data , $ transformer = null , $ resourceName = null ) { if ( ! is_null ( $ resourceName ) ) { $ this -> resourceName = $ resourceName ; } return $ this -> data ( 'item' , $ data , $ transformer ) ; }
Set the item data that must be transformed.

@param mixed $data
@param null|string|callable|\League\Fractal\TransformerAbstract $transformer
@param null|string $resourceName

@return $this
Set the item data that must be transformed .