|
|
@ -35,16 +35,17 @@ class GamesController extends Controller
|
|
|
|
public function store(Request $request)
|
|
|
|
public function store(Request $request)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
// Validate the form data
|
|
|
|
// Validate the form data
|
|
|
|
$validatedData = $request->validate([
|
|
|
|
//$validatedData = $request->validate([
|
|
|
|
'name' => 'required|max:255',
|
|
|
|
// 'name' => 'required|max:255',
|
|
|
|
'description' => 'required',
|
|
|
|
// 'description' => 'required',
|
|
|
|
//'price' => 'required|numeric',
|
|
|
|
//'price' => 'required|numeric',
|
|
|
|
//'release_date' => 'required|date',
|
|
|
|
//'release_date' => 'required|date',
|
|
|
|
]);
|
|
|
|
//]);
|
|
|
|
|
|
|
|
|
|
|
|
$game = new Game;
|
|
|
|
$game = new Game;
|
|
|
|
$game->name = $request->name;
|
|
|
|
$game->fillGameDetails($request->game_slug);
|
|
|
|
$game->description = $request->description;
|
|
|
|
ddd($game);
|
|
|
|
|
|
|
|
|
|
|
|
//$game->price = $request->price;
|
|
|
|
//$game->price = $request->price;
|
|
|
|
//$game->release_date = $request->release_date;
|
|
|
|
//$game->release_date = $request->release_date;
|
|
|
|
$game->save();
|
|
|
|
$game->save();
|
|
|
|