本文整理汇总了PHP中Picture::whereIn方法的典型用法代码示例。如果您正苦于以下问题:PHP Picture::whereIn方法的具体用法?PHP Picture::whereIn怎么用?PHP Picture::whereIn使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Picture
的用法示例。
在下文中一共展示了Picture::whereIn方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getView
public function getView($slug)
{
$category = Category::where('slug', '=', $slug)->first();
$albums = array();
foreach ($category->albums as $a) {
$albums[] = $a->id;
}
$pictures = Picture::whereIn('album_id', $albums)->orderBy('votes', 'DESC')->paginate(12);
// layouts variables
$this->layout->title = 'Категория: ' . $category->name . ' | Нещо Шантаво';
$this->layout->canonical = 'https://neshto.shantavo.com/category/' . $category->slug;
$this->layout->robots = 'index,follow,noodp,noydir';
$this->layout->description = 'Това е началната страница';
$this->layout->keywords = 'начало, нещо шантаво, team navy pier';
// nesting the view into the layout
$this->layout->nest('content', 'category.view', array('category' => $category, 'pictures' => $pictures));
}