JavaScript response helpers for PHP applications.
You can install the package via composer:
composer require sfneal/js-response-helpers
In order to autoload to the helper functions add the following path to the autoload.files section in your composer.json.
"autoload": {
"files": [
"vendor/sfneal/js-response-helpers/src/js-response-helpers.php"
]
}
Javascript response helpers can be used to generate responses in http controllers.
# generate an error message to be returned in a controller response
jsAlert('An error has occurred.');
>>> 'alert("An error has occurred.");'
composer test
Please see CHANGELOG for more information what has changed recently.
Please see CONTRIBUTING for details.
If you discover any security related issues, please email [email protected] instead of using the issue tracker.
The MIT License (MIT). Please see License File for more information.
This package was generated using the PHP Package Boilerplate.