π’Multi Tenancy Applications
The most common choice and the choice we are supporting for this package is Tenacy For Laravel (V3), but it can be made to work with any package.
What is multi tenancy? A software tenant refers to one isolated user of the software. When you sign up for a service like Office365 or Slack, they ask you to chose a workspace name or a domain, and give you your own dedicated cloud hosted version of their software. That workspace / domain / instance is commonly referred to as a tenant. Multi tenant software packages are software packages where the tenants of the software are isolated, usually having their data and cloud files completely segregated from one and other. The most common choice and the choice we are supporting for this package is Tenacy For Laravel (V3).
Installation Steps
The installation doesn't vary that much from the single tenancy applications. The main difference lies within migrations. If all of your Stripe Connectable Models use the central connection, then you do not need to do anything different, and you can follow the Single Tenancy installation, as from a stripe point of view you are not multli tenant (even if your application is).
If however your application has tenant specific models like Customers that belong within a tenant. Then you need to follow the below steps.
Enable Stripe Connect in your dashboard settings.
Install Cashier:
composer require laravel/cashier
.Install package:
composer require lanos/laravel-cashier-stripe-connect
.Publish tenant migrations
php artisan vendor:publish --tag=cashier-connect-tenancy-migrations
.OPTIONAL: Publish central migrations
php artisan vendor:publish --tag=cashier-connect-migrations
.Run tenant migrations :
php artisan tenants:migrate
OPTIONAL: Run central migrations:
php artisan migrate
Configure Stripe keys for Cashier: Cashier Docs.
The steps marked optional are only required if you have central models that are Stripe Connectable. (E.G. The tenant itself)
Last updated