fix(order): add order by volume di kualitas

This commit is contained in:
Yoga Pangestu 2025-11-16 22:48:33 +07:00
parent c835c677d4
commit 44a63aa2f5

View File

@ -25,7 +25,7 @@ public function updatedFormBottleId(string $value)
return $this->toast('Botol tidak ditemukan, silakan hubungi Administrator.', 'Gagal', 'danger');
}
$formulas = Formula::where('size', $bottle->size)->pluck('quality', 'id')->toArray();
$formulas = Formula::where('size', $bottle->size)->orderBy('volume')->pluck('quality', 'id')->toArray();
// check if there is any formula
if (empty($formulas)) {
@ -44,7 +44,7 @@ public function updatedFormBottleId(string $value)
*/
public function updatedFormBottleSize(string $value)
{
$formulas = Formula::where('size', $value)->pluck('quality', 'id')->toArray();
$formulas = Formula::where('size', $value)->orderBy('volume')->pluck('quality', 'id')->toArray();
// check if there is any formula
if (empty($formulas)) {