Rangliste almost done
This commit is contained in:
parent
12651fc2e8
commit
43fd8c8cbf
579 changed files with 172489 additions and 127 deletions
|
|
@ -5,18 +5,21 @@ namespace App\Http\Controllers;
|
|||
use Illuminate\Http\Request;
|
||||
use App\Game;
|
||||
use Carbon\Carbon;
|
||||
use Auth;
|
||||
use App\User;
|
||||
|
||||
class GamesController extends Controller
|
||||
{
|
||||
public function edit($game_id) {
|
||||
if (Auth::guest()) { return redirect("/login"); }
|
||||
$game=Game::where('id',$game_id)->first();
|
||||
//$testdate=str_replace(' UTC ','T',date('Y-m-d h:m'));
|
||||
|
||||
return view('games.edit',compact('game'));
|
||||
$kickoff_german = User::toGermanDate($game->kickoff);
|
||||
return view('games.edit',compact('game','kickoff_german'));
|
||||
}
|
||||
|
||||
public function store() {
|
||||
|
||||
if (Auth::guest()) { return redirect("/login"); }
|
||||
// Validate form
|
||||
$this->validate(request(), [
|
||||
'id' => 'required',
|
||||
|
|
@ -33,7 +36,7 @@ class GamesController extends Controller
|
|||
$game->team2 = request('team2');
|
||||
$game->score1= request('score1');
|
||||
$game->score2= request('score2');
|
||||
$game->kickoff=request('kickoff');
|
||||
$game->kickoff=User::toDBDate(request('kickoff'));
|
||||
$game->save();
|
||||
|
||||
// Redirect to the Rounds Index
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue