public function getGamesUserAction($id_user) { $this->view->disable(); header("Content-type: application/json; charset=utf-8"); header("Content-type: application/json; charset=utf-8"); $games = Games::find($id_user, array("order" => "points")); echo json_encode($games->toArray()); }
public function showDeleteGameById($id) { $game = Games::find($id); $game->delete(); //Game::destroy(1, 2, 3); }