定制 arkn/laravel-convert-case-middleware 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

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

arkn/laravel-convert-case-middleware

最新稳定版本:1.1.6

Composer 安装命令:

composer require arkn/laravel-convert-case-middleware

包简介

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

README 文档

README

🛠️ Fork of tomlerendu/laravel-convert-case-middleware with Laravel 11 support.

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 arkn/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,
    ],
];

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2025-07-23