public function postLoadSelects()
 {
     $shows = fil_show::where('sho_status', 'like', 'activo')->get(['sho_id', 'sho_name']);
     if ($shows == null) {
         return Response::json(array('success' => false, 'data' => 'Error al leer datos de los programas y de las unidades de negocio'));
     }
     return $response = Response::json(array('success' => true, 'show' => $shows));
 }
예제 #2
0
 function getBroadcastTime($listOne, $listTwo)
 {
     $shows = fil_show::where('sho_status', 'like', 'activo')->get();
     foreach ($shows as $show) {
         $videos = fil_videos::where('vid_show', '=', $show->sho_id)->get();
         $this->addToArray($listOne, $listTwo, $videos, (int) $show->sho_impacts);
     }
 }
예제 #3
0
 public function postActivate()
 {
     $values = Request::all();
     $data = fil_show::find($values['id']);
     if ($data == null) {
         return Response::json(array('success' => false, 'data' => 'No se ha encontrado el programa a restaurar'));
     }
     $data->sho_status = 'activo';
     $Response = null;
     if ($data->save()) {
         $response = Response::json(array('success' => true, 'data' => 'Programa restaurado con exito'));
     } else {
         $response = Response::json(array('success' => false, 'data' => 'Ocurrió un error al restaurar el programa'));
     }
     return $response;
 }