Ejemplo n.º 1
0
 public function onRender()
 {
     $gallery = new Gallery();
     $this->gallery = $this->page['gallery'] = $gallery->where('id', '=', $this->property('galleryId'))->first();
     $this->page['height'] = $this->property('height');
     $this->page['width'] = $this->property('width');
 }
Ejemplo n.º 2
0
 public function onRender()
 {
     if ($this->property('galleryPage') == true) {
         $this->galleries = Gallery::where('show_gallery_page', '=', 1)->get();
     } else {
         $this->galleries = Gallery::all();
     }
     $this->page['height'] = $this->property('height');
     $this->page['width'] = $this->property('width');
 }
Ejemplo n.º 3
0
 /**
  * Deleted checked galleries.
  */
 public function onDelete()
 {
     if (($checkedIds = post('checked')) && is_array($checkedIds) && count($checkedIds)) {
         foreach ($checkedIds as $galleryId) {
             if (!($gallery = Gallery::find($galleryId))) {
                 continue;
             }
             $gallery->delete();
         }
         Flash::success('Gallery successfully deleted.');
     } else {
         Flash::error('No gallery selected.');
     }
     return $this->listRefresh();
 }