dragon-code/laravel-json-response 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

dragon-code/laravel-json-response

最新稳定版本:3.1.0

Composer 安装命令:

composer require dragon-code/laravel-json-response

包简介

Automatically always return a response in JSON format

README 文档

README

Json Response for Laravel

Stable Version Total Downloads Github Workflow Status License

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.

统计信息

  • 总下载量: 17.66k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 11
  • 点击次数: 1
  • 依赖项目数: 1
  • 推荐数: 0

GitHub 信息

  • Stars: 11
  • Watchers: 2
  • Forks: 1
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2021-11-16