File tree Expand file tree Collapse file tree 2 files changed +11
-4
lines changed
Expand file tree Collapse file tree 2 files changed +11
-4
lines changed Original file line number Diff line number Diff line change 99 }
1010 ],
1111 "require" : {
12- "ext-json" : " *"
1312 },
1413 "require-dev" : {
1514 "orchestra/testbench" : " ^6.4" ,
Original file line number Diff line number Diff line change 1010 */
1111
1212return [
13- 'enum ' => \Jiannei \Enum \Laravel \Repositories \Enums \HttpStatusCodeEnum::class,
14-
1513 /*
1614 |--------------------------------------------------------------------------
1715 | Set the http status code when the response fails
2927 // Set the http status code returned when the form validation fails.
3028 // When the error_code is set to 200 or 500, it will not work
3129
32- 'validation_error_code ' => \ Jiannei \ Enum \ Laravel \ Repositories \ Enums \HttpStatusCodeEnum:: HTTP_UNPROCESSABLE_ENTITY ,
30+ 'validation_error_code ' => 422 ,
3331
3432 // Set the structure of the paging data return,the following structure will be returned by default,
3533 // You can modify the name of the inner data field through the following configuration items, such as rows or list
5351 'data_field ' => 'data ' ,
5452 ],
5553 ],
54+
55+ // You can use enumerations to define the code when the response is returned,
56+ // and set the response message according to the locale
57+ //
58+ // The following two enumeration packages are good choices
59+ //
60+ // https://github.com/Jiannei/laravel-enum
61+ // https://github.com/BenSampo/laravel-enum
62+
63+ 'enum ' => '' ,// \Jiannei\Enum\Laravel\Repositories\Enums\HttpStatusCodeEnum::class
5664];
You can’t perform that action at this time.
0 commit comments