ownerRef($request); $location = $this->locations->ensureDefault($owner); $tables = PosTable::owned($owner) ->with('currentSale') ->orderBy('area') ->orderBy('position') ->orderBy('label') ->get(); $openTickets = PosSale::owned($owner) ->openTickets() ->with('table') ->withCount('lines') ->latest('opened_at') ->get(); return view('pos.floor', [ 'location' => $location, 'tables' => $tables, 'tablesByArea' => $tables->groupBy(fn (PosTable $t) => $t->area ?: 'Floor'), 'openTickets' => $openTickets, ]); } }