Created
April 12, 2020 13:21
-
-
Save csinghdev/d967c71a1ceb7095cad28cb4edb12a05 to your computer and use it in GitHub Desktop.
Response builder config file for mapping API code and messages
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
use App\ApiCode; | |
return [ | |
/* | |
|----------------------------------------------------------------------------------------------------------- | |
| Code range settings | |
|----------------------------------------------------------------------------------------------------------- | |
*/ | |
'min_code' => 100, | |
'max_code' => 1024, | |
/* | |
|----------------------------------------------------------------------------------------------------------- | |
| Error code to message mapping | |
|----------------------------------------------------------------------------------------------------------- | |
| | |
*/ | |
'map' => [ | |
ApiCode::SOMETHING_WENT_WRONG => 'api.something_went_wrong', | |
ApiCode::INVALID_CREDENTIALS => 'api.invalid_credentials', | |
], | |
]; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment