I want to group item based on ORDER NO Where sales made by login User
$sales = KotOrder::orderBy('id','DESC')
->where('prepared_by', Auth::user()->id)
->get();
return view('settups.restaurant.pos.report', \compact('sales'));
And I tried this
$sales = KotOrder::orderBy('id','DESC')
->groupBy('qrtxt')
->where('prepared_by', Auth::user()->id)
->get();
return view('settups.restaurant.pos.report', \compact('sales'));
It gives out error

