|
|
|
|
@ -271,7 +271,9 @@ class SupplyDemandController extends BaseController
|
|
|
|
|
|
|
|
|
|
// 当期供需发布分页
|
|
|
|
|
$list = SupplyDemand::with(['user', 'dialogues' => function ($query) {
|
|
|
|
|
$query->with('user', 'toUser')->limit(2)->orderBy('created_at', 'desc');
|
|
|
|
|
$query->with(['user', 'toUser', 'messages' => function ($q) {
|
|
|
|
|
$q->orderBy('created_at', 'desc');
|
|
|
|
|
}])->limit(2)->orderBy('created_at', 'desc');
|
|
|
|
|
}])->where(function ($query) use ($type) {
|
|
|
|
|
if ($type) {
|
|
|
|
|
$query->where('type', $type);
|
|
|
|
|
|