From ce1541ae4cb86c429d8f0496e3d15ce1018a076b Mon Sep 17 00:00:00 2001 From: Yoga Pangestu Date: Mon, 23 Feb 2026 13:19:22 +0700 Subject: [PATCH] feat: Order distinct bottle sizes and bypass global scope during formula initialization. --- app/Livewire/Studio/Master/Formula.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/app/Livewire/Studio/Master/Formula.php b/app/Livewire/Studio/Master/Formula.php index 12cefdc..2024b7e 100644 --- a/app/Livewire/Studio/Master/Formula.php +++ b/app/Livewire/Studio/Master/Formula.php @@ -34,7 +34,11 @@ class Formula extends Component public function mount(): void { - $this->sizes = Bottle::distinct()->get()->pluck('size')->toArray(); + $this->sizes = Bottle::withoutGlobalScope('orderedBySize') + ->distinct() + ->orderBy('size') + ->pluck('size') + ->toArray(); } public function create(): void