resource; $try_again = false; if($model->err_code == 'SYSTEMERROR' && $model->pay_status == RefundBalanceOrder::PAY_STATUS_NO){ $try_again = true; } $data = [ 'id' => $model->id, 'nickname' => $model->users->nickname ?? '', 'mobile' => $model->users->mobile ?? '', 'created_at' => Carbon::parse($model->created_at)->format('Y-m-d H:i:s'), 'area_id' => $model->area_id, 'area_name' => $model->area->name ?? '', 'admin_user_name' => $model->adminUser->name, 'pay_money' => $model->pay_money, 'pay_status' => $model->pay_status, 'no' => $model->no, 'try_again' => $try_again ]; return $data; } }