valid([ "page_size" => "", ]); $paginate = app(OrderService::class)->paginate(Auth::id(), $params); return $this->ok($paginate); } public function export() { $name = sprintf('用户订单导出%s.xls', date("YmdHis")); Excel::store(new UserOrderExport([ "user_id" => Auth::id(), ]), $name, "public"); return $this->ok([ "url" => config("app.url") . "/storage/" . $name, ]); } }