How to make any Laravel application multi-tenant in 5 minutes
Samuel Štancl wrote a good tutorial on how to make any Laravel application multi-tenant in a short time.
We will be implementing a multi-database tenancy package of mine, stancl/tenancy into a simple Laravel blog example I found on GitHub.
The main feature of the package is that you don't have to make any changes to your app's code. After it identifies the tenant using the hostname, it automatically configures database, Redis, cache and the filesystem for that tenant.
This tutorial explains the basics of making an app multi-tenant using this package. For a real-world production application, you should read the documentation. It's not long.
This post is submitted by one of our members. You may submit a new post here.