src/ResourceFactory.php
public function make($data = null)
    {
        if (is_null($data)) {
            return new NullResource();
        } elseif (is_array($data)) {
            return static::makeFromArray($data);
        }

        $method = static::getMakeMethod($data);

        return static::$method($data);
    }
public function make($data = null)
    {
        if (is_null($data)) {
            return new NullResource();
        } elseif (is_array($data)) {
            return static::makeFromArray($data);
        }

        $method = static::getMakeMethod($data);

        return static::$method($data);
    }
public function make ( $ data = null ) { if ( is_null ( $ data ) ) { return new NullResource ( ) ; } elseif ( is_array ( $ data ) ) { return static :: makeFromArray ( $ data ) ; } $ method = static :: getMakeMethod ( $ data ) ; return static :: $ method ( $ data ) ; }
Build a resource instance from the given data.

@param  mixed|null $data
@return \League\Fractal\Resource\ResourceInterface
Build a resource instance from the given data .