jinas123 / laravel-tenant
Basic Multi-tenant support.
v1.0
2020-12-21 13:10 UTC
Requires
- php: ^7.1
- illuminate/support: ^6.0
Requires (Dev)
- orchestra/testbench: ^4.0
- phpunit/phpunit: ^8.0
This package is auto-updated.
Last update: 2024-10-23 20:41:55 UTC
README
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.