public function reps($id) { $reportes = new Reporte(); if ($reportes->getReportesByUsuario($id)) { } }
/** * Devuelve un array con los reportes creados por un usuario * Ejemplo: http://denunciaty/api/usuario/reps/5 * @param int $id */ public function reps($id) { $reportes = new Reporte(); $this->data = $reportes->getReportesByUsuario($id); }