middleware('auth:sanctum'); } protected function run(Request $request): Response { try { $id = $request->route('id'); if (!$id) { throw new AppCommonException("パラメータ不正"); } $access = $this->getAccess(); $file = $access->fileGet($id); return response($file->body(), 200, [ 'Content-Length' => $file->header('Content-Length'), 'Content-Type' => $file->header('Content-Type'), ]); } catch (Exception $e) { return response(); } } abstract protected function getAccess(): KintoneAccess; }