From f79b2ec8a9189492073138dbf057f1be4c903f29 Mon Sep 17 00:00:00 2001 From: structix Date: Thu, 30 Dec 2021 17:34:54 +0100 Subject: [PATCH] Update .dockerignore and month highscore --- shit-show/.dockerignore | 2 ++ shit-show/app/Http/Controllers/ShitController.php | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/shit-show/.dockerignore b/shit-show/.dockerignore index d0f964c..f5657ab 100644 --- a/shit-show/.dockerignore +++ b/shit-show/.dockerignore @@ -13,3 +13,5 @@ storage/framework/testing/* storage/framework/views/* storage/logs/* vendor/ + +mariadb-data diff --git a/shit-show/app/Http/Controllers/ShitController.php b/shit-show/app/Http/Controllers/ShitController.php index 34a0128..96716a5 100644 --- a/shit-show/app/Http/Controllers/ShitController.php +++ b/shit-show/app/Http/Controllers/ShitController.php @@ -57,7 +57,7 @@ class ShitController extends Controller public function highscores() { - $allshits = ShitUser::groupBy('user_id')->select('user_id', DB::raw('count(*) as total'))->orderByDesc('total')->get(); + $allshits = ShitUser::whereMonth('created_at', Carbon::now()->month)->groupBy('user_id')->select('user_id', DB::raw('count(*) as total'))->orderByDesc('total')->get(); $users = User::all()->sortBy('name'); return view('highscores')->with([