Tenancy
Sanvex scopes credentials, driver instances, and some data by owner. This lets a single Laravel app serve multiple users or teams with separate integration credentials.Global vs tenant scope
CLI setup without owner options stores credentials globally:
Runtime usage
Usefor($owner) before resolving a driver:
Owner types
An owner can be:- An Eloquent model —
owner_typeis the model class,owner_idis the primary key - Any object implementing
Sanvex\Core\Contracts\SanvexOwner - Built via
Owner::fromTypeAndId($type, $id)orOwner::global()
What gets scoped
When building multi-tenant apps, ensure OAuth callbacks and MCP usage account for owner context in your own application code.
