From 0d57d3129b2e1b97e2e05bb00374abad50d7a86f Mon Sep 17 00:00:00 2001 From: Torsten Date: Thu, 3 Aug 2017 20:47:51 +0200 Subject: [PATCH] Spielerliste alphabetisch sortieren --- pfosten/.env_local | 33 +++++++++++++++++++ pfosten/app/Game.php | 2 +- .../app/Http/Controllers/UsersController.php | 8 ++--- pfosten/resources/views/main.blade.php | 2 +- 4 files changed, 39 insertions(+), 6 deletions(-) create mode 100755 pfosten/.env_local diff --git a/pfosten/.env_local b/pfosten/.env_local new file mode 100755 index 00000000..6818d288 --- /dev/null +++ b/pfosten/.env_local @@ -0,0 +1,33 @@ +APP_NAME=Laravel +APP_ENV=local +APP_KEY=base64:kDZstIrXoxXzGa2reMEbvFjDhcaoJ4eKupyPnPL7euE= +APP_DEBUG=true +APP_LOG_LEVEL=debug +APP_URL=http://localhost + +DB_CONNECTION=mysql +DB_HOST=127.0.0.1 +DB_PORT=3306 +DB_DATABASE=pfosten +DB_USERNAME=root +DB_PASSWORD=root + +BROADCAST_DRIVER=log +CACHE_DRIVER=file +SESSION_DRIVER=file +QUEUE_DRIVER=sync + +REDIS_HOST=127.0.0.1 +REDIS_PASSWORD=null +REDIS_PORT=6379 + +MAIL_DRIVER=smtp +MAIL_HOST=smtp.mailtrap.io +MAIL_PORT=2525 +MAIL_USERNAME=null +MAIL_PASSWORD=null +MAIL_ENCRYPTION=null + +PUSHER_APP_ID= +PUSHER_APP_KEY= +PUSHER_APP_SECRET= \ No newline at end of file diff --git a/pfosten/app/Game.php b/pfosten/app/Game.php index c200b677..9c1bedb6 100755 --- a/pfosten/app/Game.php +++ b/pfosten/app/Game.php @@ -55,7 +55,7 @@ class Game extends Model $now=Carbon\Carbon::now(); if (!$game->hasResult()) { - if ($game->kickoff > $now) return "Anstoss: " . $game->kickoff; + if ($game->kickoff > $now) return "-"; $start=Carbon\Carbon::parse($game->kickoff); $end=$start->addHours(2); diff --git a/pfosten/app/Http/Controllers/UsersController.php b/pfosten/app/Http/Controllers/UsersController.php index 5844a9ba..9dc598ae 100755 --- a/pfosten/app/Http/Controllers/UsersController.php +++ b/pfosten/app/Http/Controllers/UsersController.php @@ -38,15 +38,15 @@ class UsersController extends Controller if (Auth::guest()) { return redirect("/"); } if (!Auth::user()->admin) { return redirect("/"); } - $users = DB::table('users')->where('deleted',null)->get(); + $users = DB::table('users')->where('deleted',null)->orderBy('lastname')->get(); return view('users.index', compact('users')); } - +/* public function showUsers() { - $users = DB::table('users')->get(); + $users = DB::table('users')->orderBy('lastname')->get(); return view('users.list', compact('users')); } - +*/ // Route-Model binding, because parameter in web.php route has same name as functionparameter public function showUser(User $userObject) { //return $userObject; // If you want it as a JSON object diff --git a/pfosten/resources/views/main.blade.php b/pfosten/resources/views/main.blade.php index 1dbf1770..df9df09c 100644 --- a/pfosten/resources/views/main.blade.php +++ b/pfosten/resources/views/main.blade.php @@ -3,7 +3,7 @@ @section('content')
-

Hoschis Vollpfosten

+

Hoschis Tippspiel

Eine Tippgemeinschaft unter Freunden.