can('dcat.admin.profit.pay'); } /** * Handle the form request. * * @param array $input * * @return mixed */ public function handle(array $input) { $order = OrderProfit::findOrFail($this->payload['id']); $service = new DistributeService(); try { DB::beginTransaction(); $service->success($order, $input); DB::commit(); } catch (Throwable $th) { DB::rollBack(); report($th); throw new BizException('操作失败:'.$th->getMessage()); } return $this->response()->success('操作成功')->refresh(); } /** * Build a form here. */ public function form() { $order = OrderProfit::findOrFail($this->payload['id']); $this->datetime('paid_at')->value(now()); $this->text('pay_way'); $this->text('pay_no'); $this->text('remarks')->value($order->remark); $this->disableResetButton(); } }