mirror of
https://github.com/pterodactyl/panel.git
synced 2026-12-03 12:55:41 -05:00
typed config
This commit is contained in:
@@ -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')));
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user