added ownership

This commit is contained in:
Denis Duliçi
2021-06-17 10:59:07 +03:00
parent de0d26b803
commit a3572de1ec
54 changed files with 253 additions and 37 deletions

View File

@ -18,7 +18,9 @@ trait Tenants
public function isTenantable()
{
return (isset($this->tenantable) && ($this->tenantable === true));
$tenantable = $this->tenantable ?: true;
return ($tenantable === true) && in_array('company_id', $this->getFillable());
}
public function isNotTenantable()