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'); }
public function getPlaces() { $places = Place::all(); return Response::json($places); }