亚洲在线久爱草,狠狠天天香蕉网,天天搞日日干久草,伊人亚洲日本欧美

為了賬號安全,請及時綁定郵箱和手機立即綁定
已解決430363個問題,去搜搜看,總會有你想問的

未定義的屬性:laravel API 的 stdClass::$id

未定義的屬性:laravel API 的 stdClass::$id

PHP
呼啦一陣風 2021-06-29 10:41:25
我在 Laravel 上使用 API 的查詢構建器執行此操作$shipments = DB::table('shipment_batches')            ->select(                "shipments.id as shipment_id",                "shipments.fulfillment_id",                "shipments.shipped_address_id",                "shipments.courrier_id",                "shipments.status",                "shipments.is_intro",                "shipments.is_express",                "shipments.shipment_batch_id",                "shipments.intro_shipment_date",                "shipments.intro_shipped_at",                "shipments.tracking_number",                "shipments.is_gift",                "shipments.ship_unit",                "shipments.shipment_notes",                "shipments.is_one_time_product",                "shipments.one_time_product_shipment_date",                "shipments.one_time_product_shipped_at",                "shipments.shipment_options",                "shipments.is_migrated",                "shipments.migration_has_error",                "shipments.in_process_date",                "shipments.shipment_date_at",                "shipments.link",                )            ->join('shipments', 'shipments.shipment_batch_id', '=', 'shipment_batches.id')            ->join('fulfillments', 'fulfillments.id', '=', 'shipments.fulfillment_id')            ->join('subscriptions', 'subscriptions.id', '=', 'fulfillments.subscription_id')            ->whereMonth('shipment_batches.shipment_date', '>', date('m'))            ->whereYear('shipment_batches.shipment_date', '=', date('Y'))            ->where('subscriptions.user_id', $id)            ->orderBy('shipment_batches.id', 'ASC')            ->get();我只是刪除了其他數組返回值以簡化集合。并在 API 上作為 json 返回之前添加hashed_id并padded_id修改結果我收到這個錯誤未定義的屬性:stdClass::$id是否可以從查詢構建器中創建集合?如何?
查看完整描述

2 回答

  • 2 回答
  • 0 關注
  • 215 瀏覽

添加回答

舉報

0/150
提交
取消
微信客服

購課補貼
聯系客服咨詢優惠詳情

幫助反饋 APP下載

慕課網APP
您的移動學習伙伴

公眾號

掃描二維碼
關注慕課網微信公眾號