Skip to content

Optional features

Features are classes that add optional functionality to the package — things that aren’t needed for the core tenancy logic, but are useful in some applications.

Unlike tenancy bootstrappers, features don’t do anything when tenancy is initialized or ended. They’re bootstrapped once, when the package’s service provider boots, and typically register some macro or callback.

The package comes with the following features:

All features are disabled by default. To enable a feature, uncomment it in the features section of the tenancy config:

config/tenancy.php
'features' => [
// Stancl\Tenancy\Features\UserImpersonation::class,
// Stancl\Tenancy\Features\TelescopeTags::class,
// Stancl\Tenancy\Features\CrossDomainRedirect::class,
// Stancl\Tenancy\Features\ViteBundler::class,
// Stancl\Tenancy\Features\DisallowSqliteAttach::class,
],

You can also create your own features by implementing the Stancl\Tenancy\Contracts\Feature interface and adding the class to this array.