'like', ]; /** * @var bool */ protected bool $asTree = true; /** * @var string[] */ protected $casts = [ 'type' => MenuType::class, 'status' => MenuStatus::class ]; /** * is hidden * * @return bool */ public function isHidden(): bool { return $this->hidden === Status::Disable; } /** * action type * * @return bool */ public function isAction(): bool { return $this->type == MenuType::Action; } }