yanlyan/laravel-convert-case-middleware 问题修复 & 功能扩展

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

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

yanlyan/laravel-convert-case-middleware

Composer 安装命令:

composer require yanlyan/laravel-convert-case-middleware

包简介

Convert request and response keys to and from camel and snake case.

README 文档

README

Actions Status

Convert requests from camel case to snake case. Convert responses from snake case to camel case.

Why?

Its convention to work with camel case in Javascript and snake case in PHP.

Requirements

Laravel 5.2+

Installation

  1. composer require tomlerendu/laravel-convert-case-middleware
  2. Add the middleware to the appropriate group in App\Http\Kernel.php. For example
protected $middlewareGroups = [
    'api' => [
        'throttle:60,1',
        'bindings',
        \TomLerendu\LaravelConvertCaseMiddleware\ConvertRequestToSnakeCase::class,
        \TomLerendu\LaravelConvertCaseMiddleware\ConvertResponseToCamelCase::class,
    ],
];

统计信息

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

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 15
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2023-03-19