> For the complete documentation index, see [llms.txt](https://ronaldaug.gitbook.io/sim-rest/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://ronaldaug.gitbook.io/sim-rest/helper.md).

# Helper

## R**esponse helper**

API response can be many lines of code unless using a helper method.

**Helper::response()** accepts 3 parameters

* status code
* message
* data

Example of returning success data

```php
Helper::response(200,'This is success message!',$data);
```

Example of returning error data

```php
Helper::response(401,'This is error message!',null);
```
