moved company scope to trait
This commit is contained in:
@ -2,8 +2,20 @@
|
||||
|
||||
namespace App\Traits;
|
||||
|
||||
use App\Scopes\Company;
|
||||
|
||||
trait Tenants
|
||||
{
|
||||
/**
|
||||
* The "booting" method of the model.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
protected static function bootTenants()
|
||||
{
|
||||
static::addGlobalScope(new Company);
|
||||
}
|
||||
|
||||
public function isTenantable()
|
||||
{
|
||||
return (isset($this->tenantable) && ($this->tenantable === true));
|
||||
|
Reference in New Issue
Block a user