Skip to content

Commit ec2a8de

Browse files
committed
docs(config): 📝 完善註解
1 parent daac976 commit ec2a8de

File tree

1 file changed

+11
-4
lines changed

1 file changed

+11
-4
lines changed

config/laravel-plus-api.php

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
return [
66
/*
77
|--------------------------------------------------------------------------
8+
| Specify the structure of the Response return
89
| 指定 Response 回傳結構
910
|--------------------------------------------------------------------------
1011
| {
@@ -27,28 +28,34 @@
2728
/*
2829
|--------------------------------------------------------------------------
2930
| Show exception details
31+
| 發生錯誤時是否回傳詳細錯誤訊息
3032
|--------------------------------------------------------------------------
31-
| 發生錯誤時是否回傳詳細錯誤訊息
3233
*/
3334
'show_debug_data' => config('app.debug', false),
3435

36+
/*
37+
|--------------------------------------------------------------------------
38+
| Set default return messages for different scenarios
39+
| 設置不同狀況默認的回傳訊息
40+
|--------------------------------------------------------------------------
41+
*/
3542
'default_response' => [
3643
'success' => [
3744
'api_code' => 200,
3845
'http_code' => Response::HTTP_OK,
39-
'message' => 'Success',
46+
'message' => 'Success.',
4047
],
4148

4249
'error' => [
4350
'api_code' => 500,
4451
'http_code' => Response::HTTP_INTERNAL_SERVER_ERROR,
45-
'message' => 'Unknown server error',
52+
'message' => 'Unknown server error.',
4653
],
4754

4855
'unauthenticated' => [
4956
'api_code' => 401,
5057
'http_code' => Response::HTTP_UNAUTHORIZED,
51-
'message' => 'Unauthenticated',
58+
'message' => 'Unauthenticated.',
5259
],
5360

5461
'validation_fail' => [

0 commit comments

Comments
 (0)