'datetime', 'end_date' => 'datetime', ]; public function image(): BelongsTo { return $this->belongsTo(Image::class); } // Currently within its [start_date, end_date] window (null bounds = open-ended). public function scopeActive($query) { $now = now(); return $query ->where(fn ($q) => $q->whereNull('start_date')->orWhere('start_date', '<=', $now)) ->where(fn ($q) => $q->whereNull('end_date')->orWhere('end_date', '>=', $now)); } }