public function getGameIdAction($id_user) { $this->view->disable(); header("Content-type: application/json; charset=utf-8"); $games = Games::findFirst($id_user); echo json_encode($games->toArray()); }