Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /**
- * Returns JSON Response that specified by project standards
- *
- * @param array $data
- * @param array $errors
- * @param null $message
- * @param int $status
- * @return \Illuminate\Http\JsonResponse
- */
- protected function jsonResponse($data = [], $errors = [], $message = null, $status = 200)
- {
- return response()
- ->json([
- 'data' => $data,
- 'errors' => $errors,
- 'message' => $message,
- 'code' => $status
- ], $status);
- }
Advertisement
Add Comment
Please, Sign In to add comment