More base setup and integration with AdminLTE

This commit is contained in:
Deon George
2016-10-21 01:40:52 +11:00
parent 84ae365676
commit 3f54233c39
1495 changed files with 841197 additions and 20908 deletions

View File

@@ -0,0 +1,27 @@
<?php
namespace App\Traits;
use App\Scopes\AddSiteId;
trait MultiTenant
{
/**
* The "booting" method of the model.
*
* @return void
*/
protected static function boot()
{
parent::boot();
// Force our queries to include a site ID
static::addGlobalScope(new AddSiteId);
// Capture our inserts/deletes/updates to include a site ID
// @todo this is not yet complete
static::observe(new \App\MultiTenantObserver);
}
public function table() {
return $this->table;
}
}