marcin-orlowski / laravel-api-response-builder
Helps building nice, normalized and easy to consume Laravel REST API.
Installs: 385 402
Dependents: 1
Suggesters: 0
Security: 0
Stars: 795
Watchers: 15
Forks: 86
Open Issues: 1
Requires
- php: ^8.2|^8.3|^8.4
- laravel/framework: ^12.0
Requires (Dev)
- larastan/larastan: ^3.0
- marcin-orlowski/lockpick: ^1.0
- marcin-orlowski/phpunit-extra-asserts: ^5.1.0
- orchestra/testbench: ^10.0
- phpunit/php-code-coverage: ^11.0
- phpunit/phpunit: ^11.0
- dev-master
- 12.1.1
- 12.1.0
- 12.0.2
- 12.0.1
- 12.0.0
- v11.x-dev
- 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: 2025-07-15 22:22:03 UTC
README
REST API Response Builder for Laravel
Table of contents
Introduction
ResponseBuilder
is a Laravel package, designed to help you build nice,
normalized, and easy-to-consume REST API JSON responses.
Benefits
ResponseBuilder
is written for REST API developers by REST API developers, drawing from extensive
experience on both sides of API development. It's lightweight, has no dependencies, is
thoroughly tested, and is simple to use while remaining flexible and powerful. It offers support
for on-the-fly data conversion, localization,
automatic message building, chained APIs,
and comprehensive documentation.
Moreover, the JSON structure produced by ResponseBuilder
is designed with your API users in
mind. Its well-defined and predictable structure makes
interacting with your API using ResponseBuilder
effortless. The simple, consistent JSON responses
are easy to consume. Your clients will appreciate it!
You're also covered in case of emergencies. The provided ExceptionHandlerHelper ensures your API continues to communicate in JSON (not HTML) with its clients, even in unexpected situations.
Additionally, it includes testing traits that help you add PHPUnit-based tests
for your ResponseBuilder
integration with just a few lines of code.
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 an exception handler helper to ensure your API remains consumable even in unexpected situations.
- No additional dependencies.
License
- Written and copyrighted ©2016-2025 by Marcin Orlowski <mail (#) marcinorlowski (.) com>
- ResponseBuilder is open-source software licensed under the MIT license