Download the PHP package weckhawk/pretty-response without Composer
On this page you can find all versions of the php package weckhawk/pretty-response. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Table of contents
Download weckhawk/pretty-response
More information about weckhawk/pretty-response
Files in weckhawk/pretty-response
Download weckhawk/pretty-response
More information about weckhawk/pretty-response
Files in weckhawk/pretty-response
Vendor weckhawk
Package pretty-response
Short Description A fluent and consistent API response builder for Laravel applications.
License MIT
Package pretty-response
Short Description A fluent and consistent API response builder for Laravel applications.
License MIT
Please rate this library. Is it a good library?
Informations about the package pretty-response
Laravel API Response Builder
A fluent, expressive, and consistent API response wrapper for Laravel applications. It helps you standardize JSON responses, handle paginators automatically, and keep your controllers clean.
Features
- Standardized Structure: Ensures every JSON response follows a predictable format (
success,message,data,errors,meta). - Smart Pagination Handling: Automatically extracts metadata from Eloquent
LengthAwarePaginator,SimplePaginator, andCursorPaginator. - Resource Resolution: Seamlessly unwraps Laravel's
JsonResourceandResourceCollection. - Semantic Named Constructors: Clean static methods like
ApiResponse::success(),ApiResponse::validationError(), etc.
Installation
Basic Usage
Success Response
Paginated Response
Pass any Laravel paginator directly into the success method. The package will automatically append the meta object:
Error Responses
License
The MIT License (MIT). Please see License File for more information.
All versions of pretty-response with dependencies
PHP Build Version
Package Version
Requires
php Version
^8.2
illuminate/http Version >=10.0
illuminate/pagination Version >=10.0
illuminate/contracts Version >=10.0
illuminate/http Version >=10.0
illuminate/pagination Version >=10.0
illuminate/contracts Version >=10.0
The package weckhawk/pretty-response contains the following files
Loading the files please wait ...