diff --git a/app/Http/Controllers/Mobile/SupplyDemandController.php b/app/Http/Controllers/Mobile/SupplyDemandController.php index 515db02..8dfbd5b 100755 --- a/app/Http/Controllers/Mobile/SupplyDemandController.php +++ b/app/Http/Controllers/Mobile/SupplyDemandController.php @@ -48,7 +48,7 @@ class SupplyDemandController extends CommonController $all = request()->all(); $supplyDemands = SupplyDemand::with([ 'user' => function ($query) { - $query->select('id', 'nickname', 'name', 'headimgurl'); + $query->select('id', 'nickname', 'name', 'headimgurl','username'); } ])->where(function ($query) use ($all) { if (isset($all['type'])) { @@ -302,10 +302,10 @@ class SupplyDemandController extends CommonController $all = \request()->all(); $message = Message::with([ 'user' => function ($query) { - $query->select('id', 'nickname', 'name', 'headimgurl'); + $query->select('id', 'nickname', 'name', 'headimgurl','username'); }, 'toUser' => function ($query) { - $query->select('id', 'nickname', 'name', 'headimgurl'); + $query->select('id', 'nickname', 'name', 'headimgurl','username'); } ])->where(function ($query) use ($all) { if (isset($all['dialogue_id'])) { @@ -343,10 +343,10 @@ class SupplyDemandController extends CommonController $all = \request()->all(); $dialogue = Dialogue::with(['supplyDemand', 'user' => function ($query) { - $query->select('id', 'nickname', 'name', 'headimgurl'); + $query->select('id', 'nickname', 'name', 'headimgurl','username'); }, 'toUser' => function ($query) { - $query->select('id', 'nickname', 'name', 'headimgurl'); + $query->select('id', 'nickname', 'name', 'headimgurl','username'); } ])->where(function ($query) use ($all) { $query->where('user_id', $this->getUserId())->orWhere('to_user_id', $this->getUserId());