warksit/tenant

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

Simple tenant scoping and population on creating

Installs: 565

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 1

Forks: 0

Open Issues: 0

pkg:composer/warksit/tenant

2.01 2016-10-14 19:56 UTC

This package is auto-updated.

Last update: 2025-10-11 01:56:05 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