feat: add quick-create functionality for client categories in the schedule form
This commit is contained in:
@@ -34,11 +34,12 @@ class BrandContract extends Model
|
||||
|
||||
// ── Scopes ───────────────────────────────────────────────────
|
||||
|
||||
public function scopeActive($query)
|
||||
public function scopeActive($query, $date = null)
|
||||
{
|
||||
$date = $date ?? today();
|
||||
return $query->where('is_active', true)
|
||||
->where('start_date', '<=', today())
|
||||
->where('end_date', '>=', today());
|
||||
->where('start_date', '<=', $date)
|
||||
->where('end_date', '>=', $date);
|
||||
}
|
||||
|
||||
// ── Helpers ──────────────────────────────────────────────────
|
||||
|
||||
Reference in New Issue
Block a user