get()->toArray(); return response()->json(['games' => $games], 200); } /** * Store a newly created resource in storage. */ public function store(Request $request) { // $game = Game::created($request); // return response()->json(['ressult' => $game->toArray()], 200); } /** * Display the specified resource. */ public function show(string $id) { $game = Game::findOrFail($id)->toArray(); return response()->json(['game' => $game], 200); } /** * Update the specified resource in storage. */ public function update(Request $request, string $id) { // } /** * Remove the specified resource from storage. */ public function destroy(string $id) { // } }