marcin-orlowski / laravel-api-response-builder
Helps building nice, normalized and easy to consume Laravel REST API.
Installs: 320 360
Dependents: 1
Suggesters: 0
Security: 0
Stars: 720
Watchers: 17
Forks: 79
Open Issues: 7
Requires
- php: ^8.2|^8.3
- laravel/framework: ^11.0
Requires (Dev)
- larastan/larastan: ^2.0
- marcin-orlowski/lockpick: ^1.0
- marcin-orlowski/phpunit-extra-asserts: ^5.1.0
- orchestra/testbench: ^9.0
- phpunit/php-code-coverage: ^11.0
- phpunit/phpunit: ^11.0
- dev-master
- 11.0.0
- v10.x-dev
- 10.0.0
- v9.x-dev
- 9.4.0
- 9.3.2
- 9.3.1
- 9.3.0
- 9.2.3
- 9.2.2
- 9.2.1
- 9.2.0
- 9.1.1
- 9.1.0
- 9.0.3
- 9.0.2
- 9.0.1
- 9.0.0
- v8.x-dev
- 8.1.1
- 8.1.0
- 8.0.1
- 8.0.0
- v7.x-dev
- 7.1.2
- 7.1.1
- 7.1.0
- 7.0.3
- 7.0.1
- 7.0.0
- v6.x-dev
- 6.3.2
- 6.3.1
- 6.3.0
- 6.2.3
- 6.2.2
- 6.2.1
- 6.2.0
- 6.1.2
- 6.1.1
- 6.1.0
- 6.0.0
- 4.1.9
- 4.1.7
- 4.1.6
- 4.1.5
- 4.1.3
- 4.1.2
- 4.1.1
- 4.0.2
- 4.0.1
- 4.0.0
- 3.2.1
- 3.2.0
- 3.1.0
- 3.0.3
- 3.0.1
- 3.0.0
- 2.2.1
- 2.2.0
- v2.1.2
- v2.1.1
- v2.1.0
- v2.0.0
- v1.5.0
- v1.4.2
- v1.4.1
- v1.4.0
- v1.3.0
- v1.2.0
- v1.1.0
- v1.0.1
- v1.0.0
- dev-dev
This package is auto-updated.
Last update: 2024-11-06 15:09:12 UTC
README
REST API Response Builder for Laravel
Table of contents
Introduction
ResponseBuilder
is a Laravel package, designed to help you build a nice, normalized and easy to consume
REST API JSON responses.
Benefits
ResponseBuilder
is written for REST API developers by REST API developer and is based on long-lasting experience on both
"sides" of API. It's lightweight, with no dependencies, extensively tested and simple to use yet flexible and powerful,
with support for on-the-fly data conversion, localization support,
automatic message building, chained APIs and (hopefully) exhaustive documentation.
But that's not all! The JSON structure produced by ResponseBuilder
is designed with users of your API in mind, so its
structure is predictible and well-defined which makes dealing with your API using
ResponseBuilder
library a breeze. Simple JSON response, with well-defined and predictable structure, easy to consume
without any hassle or trickery. Your clients will love it. And will love you too :)
You are also covered in a case of emergency, as provided ExceptionHandlerhelper, ensures your API keeps talking JSON (and NOT lame HTML) to its clients even in case of unexpected.
Did I mention, you would also get testing traits that automatically add PHPUnit based unit test to your
whole ResponseBuilder
related code and configuration with just a few lines of code absolutely for free?
Features
- Easy to use,
- Stable and production ready,
- On-the-fly data object conversion,
- API chaining support,
- Localization support,
- Provides traits to help unit test your API code,
- Comes with exception handler helper to ensure your API stays consumable even in case of unexpected,
- No additional dependencies.
License
- Written and copyrighted ©2016-2024 by Marcin Orlowski <mail (#) marcinorlowski (.) com>
- ResponseBuilder is open-sourced software licensed under the MIT license