0
這裏是我的查詢:使用中選擇列 '與()'
return $this->mGalleries->with(array('pictures' => function($query){
$query->wherePublished(1)->orderBy('sort');
}))->whereInUse(1)->wherePublished(1)->orderBy('date')->get(array('id', 'title'))->toArray();
I have looked at a question here但沒有運氣。
我已經嘗試了建議:
$query->select('title')->wherePublished(1)->orderBy('sort');
但所有字段的不斷問世,雖然標題確實出現第一當我這樣做。
有關如何解決此問題的任何想法?
問題是什麼?你只是說你已經嘗試了建議和字段不斷出來,以及如何解決它,但你不要問清楚的問題 –
'$ query-> select('title') - > wherePublished(1) - > orderBy('sort');'wotk但是'id /主鍵'必須在選擇列表中。 –