v0.1
0.1.0.0Simple tenant scoping and population on creating
The Requires
The Development Requires
by Andrew Westrope
tenant
Wallogit.com
2017 © Pedro Peláez
Simple tenant scoping and population on creating
Work in progress inspired by @HipsterJazzbo but app about to go live so needed something I was in control of., (*1)
Add Service Provider, (*2)
'Warksit\Tenant\TenantServiceProvider',
Add Facade, (*3)
'Tenant' => 'Warksit\Tenant\TenantFacade',
use WarksIt/tenant/TenantTrait;, (*4)
in models to scope then by the tenant_id, (*5)
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., (*6)
php artisan config:publish Warksit/tenant, (*7)
Simple tenant scoping and population on creating
tenant