예제 #1
0
 public function edicion($id = null)
 {
     if (!isLogged()) {
         redirect('admin/inicio');
     }
     $noticia = new Noticia();
     $this->data['noticia'] = $noticia->where('id', $id)->get();
     $this->data['fotos'] = $noticia->foto->get()->all;
     $usuarios = new UsuarioNoticia();
     $this->data['usuarios'] = $usuarios->get()->all;
     $this->load->helper('form');
     mostrarAdmin('admin/noticias/gestion', $this->data);
 }
예제 #2
0
 public function noticia()
 {
     return Noticia::where('texto_id', $this->id)->first();
 }