| 1 | <?php |
||
| 7 | class GamerResponseService |
||
| 8 | { |
||
| 9 | /** |
||
| 10 | * Generate an api response. |
||
| 11 | * |
||
| 12 | * @param string $type Response type |
||
| 13 | * @param string $message Response string |
||
| 14 | * |
||
| 15 | * @return Response |
||
| 16 | */ |
||
| 17 | public static function apiResponse($type, $message, $code = 200) |
||
| 21 | |||
| 22 | /** |
||
| 23 | * Generate an API error response. |
||
| 24 | * |
||
| 25 | * @param array $errors Validation errors |
||
| 26 | * @param array $inputs Input values |
||
| 27 | * |
||
| 28 | * @return Response |
||
| 29 | */ |
||
| 30 | public static function apiErrorResponse($errors, $inputs) |
||
| 50 | } |
||
| 51 |