Download the PHP package andrey-helldar/laravel-json-response without Composer
On this page you can find all versions of the php package andrey-helldar/laravel-json-response. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download andrey-helldar/laravel-json-response
More information about andrey-helldar/laravel-json-response
Files in andrey-helldar/laravel-json-response
Package laravel-json-response
Short Description Automatically always return a response in JSON format
License MIT
Informations about the package laravel-json-response
Json Response for Laravel
Automatically always return a response in JSON format
Installation
Compatibility
| PHP | Laravel | Json Response |
|---|---|---|
| 8.1, 8.2, 8.3, 8.4 | 10.x, 11.x, 12.x | ^3.0 |
| 7.3, 7.4, 8.0, 8.1, 8.2, 8.3, 8.4 | 6.x, 7.x, 8.x, 9.x, 10.x | ^2.0 |
To get the latest version of Laravel Json Response, simply require the project using Composer:
Or manually update require block of composer.json and run composer update.
Using
After you've installed the package via composer, you're done. There's no step two.
This package will automatically register the DragonCode\LaravelJsonResponse\Middlewares\SetHeaderMiddleware middleware in the web and api groups, if they exist. The
middleware will add a header Accept that will effectively convert all responses to JSON format. This header will apply to all responses.
If you need to redefine the header for specific groups of routes, you can do this by changing the
settings.
All versions of laravel-json-response with dependencies
illuminate/contracts Version ^10.0 || ^11.0 || ^12.0 || ^13.0
illuminate/http Version ^10.0 || ^11.0 || ^12.0 || ^13.0
illuminate/support Version ^10.0 || ^11.0 || ^12.0 || ^13.0
lmc/http-constants Version ^1.2
symfony/http-foundation Version ^6.0 || ^7.0 || ^8.0