From 82c40c6c9bb842cb174d5d98b4008e47f4b05dd9 Mon Sep 17 00:00:00 2001 From: Alex Date: Tue, 30 May 2023 23:55:23 +0200 Subject: [PATCH] Add GameDetails after Link --- app/Http/Controllers/GamesController.php | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/app/Http/Controllers/GamesController.php b/app/Http/Controllers/GamesController.php index a95c1d0..a673872 100644 --- a/app/Http/Controllers/GamesController.php +++ b/app/Http/Controllers/GamesController.php @@ -35,16 +35,17 @@ class GamesController extends Controller public function store(Request $request) { // Validate the form data - $validatedData = $request->validate([ - 'name' => 'required|max:255', - 'description' => 'required', + //$validatedData = $request->validate([ + // 'name' => 'required|max:255', + // 'description' => 'required', //'price' => 'required|numeric', //'release_date' => 'required|date', - ]); + //]); $game = new Game; - $game->name = $request->name; - $game->description = $request->description; + $game->fillGameDetails($request->game_slug); + ddd($game); + //$game->price = $request->price; //$game->release_date = $request->release_date; $game->save();