grohiro/laravel-camelcase-json
最新稳定版本:2.0.0
Composer 安装命令:
composer require grohiro/laravel-camelcase-json
包简介
Convert response JSON key to camelCase
README 文档
README
Convert response JSON key to camelCase.
Usage
In controller class
return response()->json($model); // => ['userName' => 'foo', 'userKey' => 'bar', ...]
Requirements
- Laravel 5+
Install
$ composer require 'grohiro/laravel-camelcase-json' '~1.0' # Laravel 5.7+ $ composer require 'grohiro/laravel-camelcase-json' '~2.0'
Add the service provider.
config/app.php
'provider' => [ // default providers // ... Grohiro\LaravelCamelCaseJson\CamelCaseJsonResponseServiceProvider::class, ],
统计信息
- 总下载量: 81.86k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 27
- 点击次数: 2
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2017-04-20