typed config

This commit is contained in:
robert dennis
2026-10-12 05:18:57 -04:00
parent 8810ae5a78
commit bb0e915fde
35 changed files with 94 additions and 91 deletions
+2 -1
View File
@@ -18,6 +18,7 @@ use Illuminate\Database\Eloquent\Relations\MorphTo;
use Illuminate\Support\Carbon;
use Illuminate\Support\Collection;
use Illuminate\Support\Facades\Event;
use Illuminate\Support\Fluent;
use LogicException;
use Pterodactyl\Contracts\Models\Identifiable;
use Pterodactyl\Events\ActivityLogged;
@@ -144,7 +145,7 @@ class ActivityLog extends Model implements Identifiable
{
throw_if((config('activity.prune_days')) === null, LogicException::class, 'Cannot prune activity logs: no "prune_days" configuration value is set.');
return static::query()->where('timestamp', '<=', now()->subDays(JsonValueGuard::integer(config('activity.prune_days'))));
return static::query()->where('timestamp', '<=', now()->subDays(Fluent::make(config()->array('activity'))->integer('prune_days')));
}
/**