本文整理汇总了PHP中Place::all方法的典型用法代码示例。如果您正苦于以下问题:PHP Place::all方法的具体用法?PHP Place::all怎么用?PHP Place::all使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Place
的用法示例。
在下文中一共展示了Place::all方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: __construct
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: getPlaces
public function getPlaces()
{
$places = Place::all();
return Response::json($places);
}