jinas123/laravel-tenant is a Laravel package for basic multi-tenant support..
It currently has 1 GitHub stars and 7 downloads on Packagist (latest version v1.0).
Install it with composer require jinas123/laravel-tenant.
Discover more Laravel packages by jinas123
or browse all Laravel packages to compare alternatives.
Last updated
This package automatically scopes the queries to a tenant. Listens for a created events and set the tenant_id automatically. Just a test package I made would not recommend to use it
You can install the package via composer:
composer require jinas123/laravel-tenant
Add the HasTenant trait into your user model. Make sure to add a tenant_id column into your user table
use Jinas\LaravelTenant\Traits\HasTenant;
class User extends Authenticatable
{
use HasTenant;
}
Any model that uses HasTenant Should include tenant_id in their database table.
composer test
If you discover any security related issues, please email [email protected] instead of using the issue tracker.
The MIT License (MIT). Please see License File for more information.