setTable(config('access_log.table_name')); parent::__construct($attributes); } protected function casts(): array { return [ 'properties' => 'collection', ]; } public function user(): BelongsTo { return $this->belongsTo(config('access_log.user_model')); } public function prunable(): Builder { $days = config('access_log.max_age_days'); return static::where(static::CREATED_AT, '<=', now()->subDays($days)); } }