加入 Room 用 name 排序 20250724
This commit is contained in:
parent
630aab8109
commit
042b56d62f
@ -31,7 +31,7 @@ class RoomGridForm extends Component
|
||||
$floors = [];
|
||||
|
||||
if ($branch) {
|
||||
$rooms = Room::where('branch_id', $branch->id)->get();
|
||||
$rooms = Room::where('branch_id', $branch->id)->orderBy('name', 'asc')->get();
|
||||
$floors = $rooms->pluck('floor')->unique()->sort()->values()->toArray();
|
||||
}
|
||||
|
||||
|
@ -74,7 +74,7 @@ final class RoomTable extends PowerGridComponent
|
||||
|
||||
public function datasource(): Builder
|
||||
{
|
||||
return Room::query();
|
||||
return Room::query()->orderBy('name', 'asc');
|
||||
}
|
||||
|
||||
public function relationSearch(): array
|
||||
|
Loading…
x
Reference in New Issue
Block a user