0
public function getShow($id, $take, $skip)
{
return $this->with(array('looks' => function($query){
$query->wherePublished(1)->orderBy('sort')->take($take)->skip(0);
}))->whereId($id)->wherePublished(1)->get(array('id', 'title', 'short_title', 'thumb', 'banner', 'video'));
}
如何通過$ take?它說它是不確定的?將var傳遞給一個雄辯的查詢?
語法錯誤,意外的「使用」(T_STRING),期待'{'' – panthro
@panthro它是'使用'。小錯字,我糾正了它。 – SamV
我可以在8分鐘內接受,謝謝。 – panthro