wboyz/laravel-api-responses
Laravel API Responses
This is a helper package based on the Laracasts Incremental APIs tutorial series for returning correctly formed json responses for API calls.
Installation
Require this package with composer:
composer require wboyz/laravel-api-responses
After updating composer, add the ServiceProvider to the providers array in config/app.php:
Laravel 5.x:
WBoyz\LaravelApiResponses\WResponseServiceProvider::class,
If you want to use the facade, add this to your facades in app.php:
'WResp' => WBoyz\LaravelApiResponses\Facades\WResponse::class,
Usage
You can return responses using the Facade (when added), using the supported methods:
public function index() {
return WResp::respondNotFound('Not Found!');
}
You can now return responses using the global helper function wresponse:
public function index() {
return wresponse()->respondNotFound('Not Found!');
}
Related Packages
sapioweb/crudhelper
Helper provider to assist in general crud functions of a restful controller
203
1
firefly-iii/api-support-classes
API support classes
19,721
5
administration
api
api support
assistant
bills
budgeting
budgeting application
budgeting tool
budgets
currency
dollar
euro
finance
finances
financial
financials
firefly
firefly iii
firefly-iii
help
helper
import
importing
laravel
management
manager
money
organizing
personal finance
planning
self hosted
self-hosted
tool
tooling
transactions
transfers
marcin-orlowski/laravel-api-response-builder
Helps building nice, normalized and easy to consume Laravel REST API.
539,246
853
Version History
| Version | Released | PHP | Laravel | License |
|---|---|---|---|---|
| v0.5.2 | >=5.5.9 | ^5.2 | MIT | |
| v0.5.1 | >=5.5.9 | ^5.2 | MIT | |
| v0.5.0 | >=5.5.9 | ^5.2 | MIT | |
| v0.4.2 | >=5.5.9 | ^5.2 | MIT | |
| v0.4.1 | >=5.5.9 | ^5.2 | MIT | |
| v0.4.0 | >=5.5.9 | ^5.2 | MIT | |
| v0.3.1 | >=5.5.9 | ^5.2 | MIT | |
| 0.3.0 | >=5.5.9 | ^5.2 | MIT | |
| 0.1.0 | >=5.5.9 | ^5.2 | MIT |