Skip to content

Commit

Permalink
Update ReweController.php
Browse files Browse the repository at this point in the history
  • Loading branch information
MrKrisKrisu committed Dec 30, 2020
1 parent bc966d8 commit 5abbd7c
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions app/Http/Controllers/ReweController.php
Original file line number Diff line number Diff line change
Expand Up @@ -227,12 +227,17 @@ public function showShop(int $id): Renderable {
->select(['id', 'cashregister_nr', 'paymentmethod', 'user_id', 'shop_id', 'timestamp_bon', 'total'])
->paginate(7);

$countOther = ReweBon::where('shop_id', $shop->id)->select(['user_id'])->groupBy(['user_id'])->count();
$countOther = ReweBon::where('shop_id', $shop->id)
->where('user_id', '<>', Auth::user()->id)
->select(['user_id'])
->groupBy(['user_id'])
->get()
->count();

return view('rewe_ebon.shop', [
'shop' => $shop,
'history' => $history,
'countOther' => $countOther - 1
'countOther' => $countOther
]);
}

Expand Down

0 comments on commit 5abbd7c

Please sign in to comment.