Download the PHP package mbarlow/laravel-response-helpers without Composer
On this page you can find all versions of the php package mbarlow/laravel-response-helpers. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download mbarlow/laravel-response-helpers
More information about mbarlow/laravel-response-helpers
Files in mbarlow/laravel-response-helpers
Package laravel-response-helpers
Short Description Helpers for Laravel based API responses
License MIT
Informations about the package laravel-response-helpers
A collection of helpers for returning a response from your API more expressively.
Installation
Simply require the package via composer into your Laravel API.
composer require mbarlow/laravel-response-helpers
No extra setup is required. The helper file is autoloaded via the "autoload" attributes of the composer.json
file.
Usage
2xx Success
200 OK
201 Created
202 Accepted
204 No Content
3xx Redirection
301 Moved Permanently
302 Found
303 Found
307 Temporary Redirect
4xx Client Errors
400 Bad Request
401 Unauthorized
402 Payment Required
403 Forbidden
404 Not Found
405 Method Not Allowed
406 Not Acceptable
410 Gone
413 Payload Too Large
422 Unprocessable Entity
426 Upgrade Required
429 Too Many Requests
5xx Server Errors
500 Internal Server Errors
501 Not Implemented
502 Bad Gateway
503 Service Unavailable
504 Gateway Timeout
507 Insufficient Storage
Testing
If you wish to run the tests, clone out the repository
git clone [email protected]:mikebarlow/laravel-response-helpers.git
Change to the root of the repository and run composer install with the dev dependencies
cd laravel-response-helpers
composer install
A script is defined in the composer.json
to run both the code sniffer and the unit tests
composer run test
Or run them individually as required
./vendor/bin/phpunit
./vendor/bin/phpcs --standard=PSR2 src
Changelog
Please see CHANGELOG for more information on what has changed recently.
Contributing
Please see CONTRIBUTING for details.
License
The MIT License (MIT). Please see License File for more information.