Casts\GameSettingsCaster::class, ]; /** * Get the prunable model query. * * @return \Illuminate\Database\Eloquent\Builder */ public function prunable() { return static::where('created_at', '<', now()->subDay(1)); } public function getHashAttribute() { return Hashids::encode($this->id); } public function scopeHash($q, $hash) { return $q->where('id', Hashids::decode($hash)); } }