'boolean', ]; public function scopeByType(Builder $query, string $type): Builder { return $query->where('type', $type); } public function isFeaturePlugin(): bool { return $this->type === self::TYPE_FEATURE; } public function isPaymentPlugin(): bool { return $this->type === self::TYPE_PAYMENT; } public function isProtected(): bool { return in_array($this->code, self::PROTECTED_PLUGINS); } public function canBeDeleted(): bool { return !$this->isProtected(); } }