Пример #1
0
 public function __construct()
 {
     $this->data['messages'] = View::make('block.messages')->with('messages', $this->getMessage())->render();
     $this->data['setting'] = Setting::first();
     $this->data['sliderList'] = Slider::orderBy('sort')->get();
     $this->data['socialList'] = Social::orderBy('sort')->get();
     $this->data['categoryList'] = Category::where('main', 0)->orderBy('sort')->get();
     $this->data['groupList'] = Group::orderBy('sort')->get();
     $this->data['buildOwn'] = Product::where('is_build', 1)->first();
     $placeList = Place::all();
     foreach ($placeList as $place) {
         $this->data['place'][$place->name] = $place->pageList()->orderBy('sort')->get();
     }
     $this->data['seo'] = array('keywords' => 'Pepperino', 'title' => 'Pepperino', 'description' => 'Pepperino');
 }
Пример #2
0
 /**
  *
  * @param $id int
  * @return nothing
  * @author Tremor
  */
 public function social($id = 0)
 {
     $this->data['active'] = __FUNCTION__;
     if (isset($id) && !empty($id) && is_numeric($id)) {
         $this->data['social'] = Social::find($id);
         return View::make('admin.social.one')->with($this->data);
     } else {
         $this->data['socialList'] = Social::orderBy('sort', 'asc')->get();
         return View::make('admin.social.list')->with($this->data);
     }
 }