added tenantable attribute to models

This commit is contained in:
denisdulici
2020-05-02 14:33:41 +03:00
parent a0c154ded4
commit 8c4ca9d73c
9 changed files with 49 additions and 4 deletions

18
app/Traits/Tenants.php Normal file
View File

@ -0,0 +1,18 @@
<?php
namespace App\Traits;
trait Tenants
{
protected $tenantable = true;
public function isTenantable()
{
return (isset($this->tenantable) && ($this->tenantable === true));
}
public function isNotTenantable()
{
return !$this->isTenantable();
}
}