Example #1
0
 static function show($position)
 {
     $route = Route::getCurrentRoute();
     if (!is_null($route)) {
         $route = $route->getActionName();
     }
     //get the location for this route
     $grid = Grids::where('route', '=', $route)->first();
     if (!isset($grid->id)) {
         $grid = Grids::find(1);
     }
     $result = '';
     foreach ($grid->blocks()->where('block_position', '=', $position)->get() as $block) {
         $datas = Event::fire($block->event_to_fire, array(unserialize($block->params)));
         foreach ($datas as $data) {
             if (isset($data)) {
                 $result .= View::make($block->view_path)->with('data', $data);
             }
         }
     }
     return $result;
 }
Example #2
0
 public function delgrid($gridid)
 {
     $grid = Grids::find($gridid);
     $grid->delete();
     return Redirect::to('backend/gridmanager/')->withMessage($this->notifyView(Lang::get('grid_manager::messages.grid_deleted'), 'success'));
 }