Spatie\Fractal\Fractal::withResourceName PHP Метод

withResourceName() публичный Метод

Set the resource name, to replace 'data' as the root of the collection or item.
public withResourceName ( string $resourceName )
$resourceName string
    public function withResourceName($resourceName)
    {
        $this->resourceName = $resourceName;
        return $this;
    }