PostIco::where('listingType', '!=', 1)->where('status', 1) // and you can add chain of wheres
->orderBy('listingType')
->orderBy('created_at', 'desc')
->limit(25)
->paginate(10);
// OR
PostIco::where('listingType', '!=', 1)->orWhere('status', 1) // and you can add chain of wheres and orWheres
->orderBy('listingType', 'asc')
->limit(25)
->paginate(10);
2条答案
按热度按时间e5nszbig1#
是
PostIco
有口才的模特?如果是这样,你就不用table
方法。你也可以用
DB
外观:编辑:已更正的orderby语句
bd1hkmkf2#
对于多个where子句,可以执行以下操作: