laravel-json-response maintained by dragon-code
Last update
2026/03/19 23:43
License
Require
- lmc/http-constants ^1.2
- php ^8.1
- illuminate/contracts ^10.0 || ^11.0 || ^12.0 || ^13.0
- illuminate/http ^10.0 || ^11.0 || ^12.0 || ^13.0
- illuminate/support ^10.0 || ^11.0 || ^12.0 || ^13.0
- symfony/http-foundation ^6.0 || ^7.0 || ^8.0
Last update
2026/03/19 23:43
License
Require
- php ^8.1
- illuminate/contracts ^10.0 || ^11.0 || ^12.0 || ^13.0
- illuminate/http ^10.0 || ^11.0 || ^12.0 || ^13.0
- illuminate/support ^10.0 || ^11.0 || ^12.0 || ^13.0
- lmc/http-constants ^1.2
- symfony/http-foundation ^6.0 || ^7.0 || ^8.0
Last update
2026/03/19 23:42
License
Require
- php ^8.1
- illuminate/contracts ^10.0 || ^11.0 || ^12.0 || ^13.0
- illuminate/http ^10.0 || ^11.0 || ^12.0 || ^13.0
- illuminate/support ^10.0 || ^11.0 || ^12.0 || ^13.0
- lmc/http-constants ^1.2
- symfony/http-foundation ^6.0 || ^7.0 || ^8.0
Last update
2025/02/24 14:59
License
Require
- php ^8.1
- illuminate/contracts ^10.0 || ^11.0 || ^12.0
- illuminate/http ^10.0 || ^11.0 || ^12.0
- illuminate/support ^10.0 || ^11.0 || ^12.0
- lmc/http-constants ^1.2
- symfony/http-foundation ^6.0 || ^7.0
Last update
2024/04/01 23:21
License
Require
- php ^8.1
- illuminate/contracts ^10.0 || ^11.0
- illuminate/http ^10.0 || ^11.0
- illuminate/support ^10.0 || ^11.0
- lmc/http-constants ^1.2
- symfony/http-foundation ^6.0 || ^7.0
Last update
2024/04/01 23:20
License
Require
- php ^8.1
- illuminate/contracts ^10.0 || ^11.0
- illuminate/http ^10.0 || ^11.0
- illuminate/support ^10.0 || ^11.0
- lmc/http-constants ^1.2
- symfony/http-foundation ^6.0 || ^7.0
Last update
2024/03/12 22:15
License
Require
- php ^8.1
- illuminate/contracts ^10.0 || ^11.0
- illuminate/http ^10.0 || ^11.0
- illuminate/support ^10.0 || ^11.0
- lmc/http-constants ^1.2
- symfony/http-foundation ^6.0 || ^7.0
Last update
2024/03/04 15:50
License
Require
- php ^7.3 || ^8.0
- illuminate/contracts >=6.0 <11.0
- illuminate/http >=6.0 <11.0
- illuminate/support >=6.0 <11.0
- lmc/http-constants ^1.2
- symfony/http-foundation ^4.3 || ^5.0 || ^6.0
Last update
2023/10/23 06:15
License
Require
- php ^7.3 || ^8.0
- illuminate/contracts >=6.0 <11.0
- illuminate/http >=6.0 <11.0
- illuminate/support >=6.0 <11.0
- lmc/http-constants ^1.2
- symfony/http-foundation ^4.3 || ^5.0 || ^6.0
Last update
2023/02/15 10:17
License
Require
- php ^7.3 || ^8.0
- illuminate/contracts >=6.0 <11.0
- illuminate/http >=6.0 <11.0
- illuminate/support >=6.0 <11.0
- lmc/http-constants ^1.2
- symfony/http-foundation ^4.3 || ^5.0 || ^6.0
Last update
2023/02/15 10:17
License
Require
- php ^7.3 || ^8.0
- lmc/http-constants ^1.2
- symfony/http-foundation ^4.3 || ^5.0 || ^6.0
- illuminate/contracts >=6.0 <11.0
- illuminate/http >=6.0 <11.0
- illuminate/support >=6.0 <11.0
Last update
2022/10/15 20:19
License
Require
- php ^7.3 || ^8.0
- illuminate/contracts ^6.0 || ^7.0 || ^8.0 || ^9.0
- illuminate/http ^6.0 || ^7.0 || ^8.0 || ^9.0
- illuminate/support ^6.0 || ^7.0 || ^8.0 || ^9.0
- lmc/http-constants ^1.2
- symfony/http-foundation ^4.3 || ^5.0 || ^6.0
Last update
2022/02/11 23:19
License
Require
- php ^7.3 || ^8.0
- illuminate/contracts ^6.0 || ^7.0 || ^8.0 || ^9.0
- illuminate/http ^6.0 || ^7.0 || ^8.0 || ^9.0
- illuminate/support ^6.0 || ^7.0 || ^8.0 || ^9.0
- lmc/http-constants ^1.2
- symfony/http-foundation ^4.3 || ^5.0 || ^6.0
Last update
2022/02/11 23:17
License
Require
- php ^7.3 || ^8.0
- illuminate/contracts ^6.0 || ^7.0 || ^8.0 || ^9.0
- illuminate/http ^6.0 || ^7.0 || ^8.0 || ^9.0
- illuminate/support ^6.0 || ^7.0 || ^8.0 || ^9.0
- lmc/http-constants ^1.2
- symfony/http-foundation ^4.3 || ^5.0 || ^6.0
Last update
2022/02/11 22:12
License
Require
- php ^7.3 || ^8.0
- illuminate/contracts ^6.0 || ^7.0 || ^8.0 || ^9.0
- illuminate/http ^6.0 || ^7.0 || ^8.0 || ^9.0
- illuminate/support ^6.0 || ^7.0 || ^8.0 || ^9.0
- lmc/http-constants ^1.2
Last update
2022/01/31 14:14
License
Require
- php ^7.3 || ^8.0
- illuminate/contracts ^6.0 || ^7.0 || ^8.0 || ^9.0
- illuminate/http ^6.0 || ^7.0 || ^8.0 || ^9.0
- illuminate/support ^6.0 || ^7.0 || ^8.0 || ^9.0
- lmc/http-constants ^1.2
Last update
2022/01/17 17:09
License
Require
- php ^7.3 || ^8.0
- illuminate/contracts ^6.0 || ^7.0 || ^8.0 || ^9.0
- illuminate/http ^6.0 || ^7.0 || ^8.0 || ^9.0
- illuminate/support ^6.0 || ^7.0 || ^8.0 || ^9.0
Last update
2021/11/16 21:34
License
Require
- php ^7.3|^8.0
- illuminate/contracts ^6.0|^7.0|^8.0
- illuminate/http ^6.0|^7.0|^8.0
- illuminate/support ^6.0|^7.0|^8.0
Last update
2021/10/29 22:14
License
Require
- php ^7.3|^8.0
- illuminate/contracts ^6.0|^7.0|^8.0
- illuminate/http ^6.0|^7.0|^8.0
- illuminate/support ^6.0|^7.0|^8.0
Last update
2021/06/07 18:10
License
Require
- php ^7.3|^8.0
- illuminate/contracts ^6.0|^7.0|^8.0
- illuminate/http ^6.0|^7.0|^8.0
- illuminate/support ^6.0|^7.0|^8.0
Last update
2021/06/07 17:10
License
Require
- php ^7.3|^8.0
- illuminate/contracts ^6.0|^7.0|^8.0
- illuminate/http ^6.0|^7.0|^8.0
- illuminate/support ^6.0|^7.0|^8.0
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:
composer require dragon-code/laravel-json-response
Or manually update require block of composer.json and run composer update.
{
"require": {
"dragon-code/laravel-json-response": "^3.0"
}
}
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.