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'); }
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'); }