warksit/tenant

There is no license information available for the latest version (2.01) of this package.

Simple tenant scoping and population on creating

2.01 2016-10-14 19:56 UTC

This package is auto-updated.

Last update: 2024-05-10 22:59:15 UTC


README

Work in progress inspired by @HipsterJazzbo but app about to go live so needed something I was in control of.

Add Service Provider

    'Warksit\Tenant\TenantServiceProvider',

Add Facade

    'Tenant'        	=> 'Warksit\Tenant\TenantFacade',

use WarksIt/tenant/TenantTrait;

in models to scope then by the tenant_id

Publish config and update models and then an observer is set in the ServiceProvider. I found boot method of Eloquent model too unreliable to set there.

php artisan config:publish Warksit/tenant