本文整理汇总了PHP中app\Page::whereLanguageId方法的典型用法代码示例。如果您正苦于以下问题:PHP Page::whereLanguageId方法的具体用法?PHP Page::whereLanguageId怎么用?PHP Page::whereLanguageId使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类app\Page
的用法示例。
在下文中一共展示了Page::whereLanguageId方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: index
/**
* Display a listing of the pages.
*
* @return Response
*/
public function index()
{
$language = Session::get('current_lang');
$pages = Page::whereLanguageId($language->id);
$pages = $pages->count() > 1 ? $language->pages->toHierarchy() : $pages->get();
return view('admin.pages.index', compact('pages'));
}
示例2: index
/**
* Display a listing of the pages.
*
* @return Response
*/
public function index()
{
$pages = Page::whereLanguageId($this->language->id);
$pages = $pages->count() > 1 ? $this->language->pages->toHierarchy() : $pages->get();
return view('admin.pages.index', compact('pages'));
}
示例3: index
/**
* Display a listing of the pages.
*
* @return Response
*/
public function index()
{
$pages = Page::whereLanguageId(session('current_lang')->id);
$pages = $pages->count() > 1 ? session('current_lang')->pages->toHierarchy() : $pages->get();
return $this->viewPath("index", $pages);
}
示例4: index
/**
* Display a listing of the pages.
*
* @return Response
*/
public function index()
{
$pages = Page::whereLanguageId($this->language->id);
$pages = $pages->count() > 1 ? $this->language->pages->toHierarchy() : $pages->get();
return $this->viewPath("index", $pages);
}