update fix deadcode, security

This commit is contained in:
baodev0
2026-09-28 08:26:29 +07:00
parent 3af59bd9c5
commit 82080b5b84
452 changed files with 4857 additions and 26289 deletions
-22
View File
@@ -3,7 +3,6 @@
namespace App\Models;
use App\Traits\LogsActivity;
use App\View\Components\Module\OsVersion;
use Illuminate\Database\Eloquent\Concerns\HasUuids;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
@@ -116,21 +115,6 @@ class Service extends Model
return $this->status === 'active';
}
public function isPending(): bool
{
return $this->status === 'pending';
}
public function canRetryProvisioning(): bool
{
return $this->isPending() && $this->retry_requested_at === null;
}
public function retryRequested(): bool
{
return $this->retry_requested_at !== null;
}
public function isExpired(): bool
{
return $this->expires_at !== null && $this->expires_at->isPast();
@@ -148,10 +132,4 @@ class Service extends Model
default => ucfirst($this->status),
};
}
/** Convenience: get an addon value by type. */
public function getAddon(string $type): ?string
{
return $this->addons->firstWhere('addon_type', $type)?->addon_value;
}
}