pluck('sku_id')->toArray(); try { DB::beginTransaction(); ProductSku::skuVerify($skuIds, (int) $input['status'], $input['remarks']); DB::commit(); } catch (Throwable $th) { DB::rollBack(); report($th); return $this->response()->error('操作失败:'.$th->getMessage()); } return $this->response() ->success(__('admin.update_succeeded')) ->refresh(); } /** * Build a form here. */ public function form() { $this->radio('status')->options([ 1 => '成功', 2 => '拒绝', ])->default(1); $this->text('remarks'); // 设置隐藏表单,传递用户id $this->hidden('id')->attribute('id', 'verify-sku-id'); } }