getKey()]); DB::commit(); } catch (Throwable $th) { DB::rollBack(); return $this->response()->error('操作失败,'.$th->getMessage())->refresh(); } return $this->response()->success('操作成功')->refresh(); } /** * @return string|array|void */ public function confirm() { return ['确认当前商品取消上架申请?']; } /** * @param Model|Authenticatable|HasPermissions|null $user * * @return bool */ protected function authorize($user): bool { return true; } /** * @return array */ protected function parameters() { return []; } }