19 lines
303 B
PHP
19 lines
303 B
PHP
<?php
|
|
|
|
namespace App\Traits;
|
|
|
|
trait Owners
|
|
{
|
|
public function isOwnable()
|
|
{
|
|
$ownable = $this->ownable ?: true;
|
|
|
|
return ($ownable === true) && in_array('created_by', $this->getFillable());
|
|
}
|
|
|
|
public function isNotOwnable()
|
|
{
|
|
return !$this->isOwnable();
|
|
}
|
|
}
|