Add GameDetails after Link

main
Alex 2 years ago
parent 63e901aafb
commit 82c40c6c9b

@ -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();

Loading…
Cancel
Save