Files
LaravelSkeletonAPI/app/Kernel/Object/HasHiddenAttributes.php
2026-01-05 16:33:20 +04:00

18 lines
317 B
PHP

<?php
declare(strict_types=1);
namespace App\Kernel\Object;
trait HasHiddenAttributes
{
public function isHidden(string $key): bool
{
if (property_exists($this, 'hidden') && is_array($this->hidden)) {
return in_array($key, $this->hidden, true);
}
return false;
}
}