Skip to content

Commit 91c46d8

Browse files
committed
fix(class): 🐛 修正exceptionError的data參數類型限制
1 parent b3f3c5a commit 91c46d8

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/Classes/ApiResponseBuilder.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,15 @@ public static function validationError(ValidationException $e): JsonResponse
2323
->build();
2424
}
2525

26+
/**
27+
* @param object|array|null $data
28+
*/
2629
public static function exceptionError(
2730
Throwable $throwable = null,
2831
string $apiCode = null,
2932
int $httpCode,
3033
string $message = null,
31-
string $data = null,
34+
mixed $data = null,
3235
array $headers = []
3336
): JsonResponse {
3437
$apiCode = $apiCode ?? config('laravel-plus-api.default_response.error.api_code');

0 commit comments

Comments
 (0)