本文整理汇总了PHP中Social::orderBy方法的典型用法代码示例。如果您正苦于以下问题:PHP Social::orderBy方法的具体用法?PHP Social::orderBy怎么用?PHP Social::orderBy使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Social
的用法示例。
在下文中一共展示了Social::orderBy方法的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: social
/**
*
* @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);
}
}