Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork1
Automatically always return a response in JSON format
License
TheDragonCode/laravel-json-response
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
Automatically always return a response in JSON format
To get the latest version ofLaravel Json Response, simply require the project usingComposer:
composer require dragon-code/laravel-json-response
Or manually updaterequire block ofcomposer.json and runcomposer update.
{"require": {"dragon-code/laravel-json-response":"^2.0" }}After you've installed the package via composer, you're done. There's no step two.
This package will automatically register theDragonCode\LaravelJsonResponse\Middlewares\SetHeaderMiddleware middleware in theweb andapi groups, if they exist. Themiddleware will add a headerAccept 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.
About
Automatically always return a response in JSON format
Resources
License
Contributing
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Sponsor this project
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Contributors5
Uh oh!
There was an error while loading.Please reload this page.