belongsTo(Plant::class); } public function item(): BelongsTo { return $this->belongsTo(Item::class); } public function prunable(): Builder { // $startOfTwoMonthsAgo = now()->subMonthsNoOverflow(3)->startOfMonth(); // $endOfPrevMonth = now()->subMonthNoOverflow()->endOfMonth(); // return static::whereBetween('created_at', [$startOfTwoMonthsAgo, $endOfPrevMonth]); return static::where('created_at', '<=', now()->subMonthsNoOverflow(6)); } }