Overview
Resources are Spatie Laravel Data resources used by core responses and controllers. Each resource has a contract inEsign\UnleashCommerce\Core\Contracts\Resources, and the core maps those contracts to default implementations via the ResourceManifest.
Replace a core resource
Create a custom resource that implements the same contract. You can extend the core resource and override methods as needed:Bind the resource in the manifest
Register your replacement in a service provider using theResourceManifest:
Resolve the active resource class
When you need to nest resources or use them inside other resources, resolve the active implementation viaresourceClass() so replacements are respected: