public function getNoticiasIngresadas() { if (!Sesion::isAdmin()) { return Redirect::to('administracion/logout'); } $format = "Y-m-d"; $timestamp = time(); $fecha = date($format, $timestamp); $fechaInicio = $fecha . " 00:00:00"; $fechaFin = $fecha . " 23:59:59"; // $ser=DB::select('SELECT f.fueNombre, r.resNombre, f.fueId FROM noticias n, fuentes f, responsables r WHERE n.notFuente = f.fueId AND n.notResponsables = r.resId AND n.notFecha >= "'.$fechaInicio.'" AND n.notFecha <= "'.$fechaFin.'" GROUP BY f.fueid ORDER BY f.fueid;'); $seleccionar = NoticiasController::consultaNoticiasIngresadas($fechaInicio, $fechaFin); if (count($seleccionar) > 0) { $response = array('status' => 'OK', 'data' => $seleccionar, 'message' => 'Resultados obtenidos'); } else { $response = array('status' => 'ERROR', 'message' => 'No se encontraron noticias registradas.'); } return Response::json($response); }