laravel-tenant maintained by jinas123
Description
Basic Multi-tenant support.
Author
Last update
2020/12/23 13:25
(dev-master)
License
Downloads
7
Tags
Laravel Tenant (Belongs to tenant)
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
Installation
You can install the package via composer:
composer require jinas123/laravel-tenant
Usage
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.
Testing
composer test
Security
If you discover any security related issues, please email j@live.mv instead of using the issue tracker.
Credits
License
The MIT License (MIT). Please see License File for more information.