where('order_no', $no)->exists()) { return $no; } } return false; } public function user() { return $this->belongsTo(User::class)->select(['id', 'nickname', 'headimg', 'mobile', 'mobile_encryption', 'mobile_code']); } public function goods() { return $this->hasMany(OrderGood::class, 'order_id')->with(['good'])->select(['nums', 'id', 'good_id', 'xuefen', 'order_id']); } }