Fix mariadb count bug
This commit is contained in:
1
shit-show/.gitignore
vendored
1
shit-show/.gitignore
vendored
@@ -13,3 +13,4 @@ npm-debug.log
|
|||||||
yarn-error.log
|
yarn-error.log
|
||||||
/.idea
|
/.idea
|
||||||
/.vscode
|
/.vscode
|
||||||
|
mariadb-data
|
||||||
|
@@ -46,7 +46,7 @@ class ShitController extends Controller
|
|||||||
|
|
||||||
public function highscores() {
|
public function highscores() {
|
||||||
|
|
||||||
$allshits = ShitUser::groupBy('user_id')->select('user_id', DB::raw('count (*) as total'))->orderByDesc('total')->get();
|
$allshits = ShitUser::groupBy('user_id')->select('user_id', DB::raw('count(*) as total'))->orderByDesc('total')->get();
|
||||||
$users = User::all()->sortBy('name');
|
$users = User::all()->sortBy('name');
|
||||||
|
|
||||||
return view('highscores')->with([
|
return view('highscores')->with([
|
||||||
|
13
shit-show/docker-compose-dev.yml
Normal file
13
shit-show/docker-compose-dev.yml
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
version: '3.3'
|
||||||
|
services:
|
||||||
|
mariadb:
|
||||||
|
image: mariadb
|
||||||
|
ports:
|
||||||
|
- 3306:3306
|
||||||
|
environment:
|
||||||
|
MYSQL_ROOT_PASSWORD: example
|
||||||
|
MYSQL_DATABASE: laravel
|
||||||
|
MYSQL_USER: web
|
||||||
|
MYSQL_PASSWORD: example
|
||||||
|
volumes:
|
||||||
|
- ./mariadb-data:/var/lib/mysql
|
Reference in New Issue
Block a user