onQueue(QueueName::OTHER->value); } /** * Execute the job. * * @return void */ public function handle(SMSManager $manager) { // 顧客情報取得 $customer = collect(API::getCustomers($this->customerCode)) ->where('customer_code', $this->customerCode) ->firstOrFail(); // 駐車場情報取得 $parking = collect(API::getParkings($this->customerCode, $this->parkingManagementCode)) ->where('parking_management_code', $this->parkingManagementCode) ->firstOrFail(); // モデル更新 $model = HtCustomParkingName::whereCustomerCode($this->customerCode) ->whereParkingManagementCode($this->parkingManagementCode) ->firstOrNew([ HtCustomParkingName::COL_NAME_CUSTOMER_CODE => $this->customerCode, HtCustomParkingName::COL_NAME_PARKING_MANAGEMENT_CODE => $this->parkingManagementCode, ]); $model->customer_name = $customer['name']; $model->parking_name = $parking['name']; $model->save(); } }