LaravelPackages.net
Acme Inc.
Toggle sidebar
jinas123/laravel-tenant

Basic Multi-tenant support.

7
1
v1.0
About jinas123/laravel-tenant

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

Laravel Tenant (Belongs to tenant)

StyleCI

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 [email protected] instead of using the issue tracker.

Credits

License

The MIT License (MIT). Please see License File for more information.

Comments