Skip to content

Commit d45cf49

Browse files
author
Itamar Junior
committed
Sort service categories by name when loading in CategoryManager
1 parent ccf7066 commit d45cf49

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

app/Livewire/Company/Service/CategoryManager.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,8 @@ public function mount()
3535
public function loadCategories()
3636
{
3737
$this->authorize('viewAny', ServiceCategory::class);
38-
$this->categories = ServiceCategory::where('business_id', Auth::user()->current_business_id)->get();
38+
$this->categories = ServiceCategory::where('business_id', Auth::user()->current_business_id)->get()
39+
->sortBy('name');
3940
}
4041

4142
public function openCreateModal()

0 commit comments

Comments
 (0)