|
|
|
|
@ -46,7 +46,11 @@ class SupplyDemandController extends CommonController
|
|
|
|
|
public function index()
|
|
|
|
|
{
|
|
|
|
|
$all = request()->all();
|
|
|
|
|
$supplyDemands = SupplyDemand::where(function ($query) use ($all) {
|
|
|
|
|
$supplyDemands = SupplyDemand::with([
|
|
|
|
|
'user' => function ($query) {
|
|
|
|
|
$query->select('id', 'nickname', 'name', 'headimgurl');
|
|
|
|
|
}
|
|
|
|
|
])->where(function ($query) use ($all) {
|
|
|
|
|
if (isset($all['type'])) {
|
|
|
|
|
$query->where('type', $all['type']);
|
|
|
|
|
}
|
|
|
|
|
|