PHPackages                             yanlyan/laravel-convert-case-middleware - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. yanlyan/laravel-convert-case-middleware

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

yanlyan/laravel-convert-case-middleware
=======================================

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

08PHP

Since Mar 19Pushed 1y agoCompare

[ Source](https://github.com/yanlyan/laravel-convert-case-middleware)[ Packagist](https://packagist.org/packages/yanlyan/laravel-convert-case-middleware)[ RSS](/packages/yanlyan-laravel-convert-case-middleware/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

Laravel Convert Case Middleware
===============================

[](#laravel-convert-case-middleware)

[![Actions Status](https://github.com/tomlerendu/laravel-convert-case-middleware/workflows/Tests/badge.svg)](https://github.com/tomlerendu/laravel-convert-case-middleware/actions)

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

Why?
----

[](#why)

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

Requirements
------------

[](#requirements)

Laravel 5.2+

Installation
------------

[](#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,
    ],
];

```

###  Health Score

16

—

LowBetter than 5% of packages

Maintenance27

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity23

Early-stage or recently created project

 Bus Factor1

Top contributor holds 76.2% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://www.gravatar.com/avatar/7416deb7c0801ecd555648c2ee90c112da77898d7a47df9c9b499b6315628520?d=identicon)[yanlyan](/maintainers/yanlyan)

---

Top Contributors

[![tomlerendu](https://avatars.githubusercontent.com/u/3859851?v=4)](https://github.com/tomlerendu "tomlerendu (16 commits)")[![yanlyan](https://avatars.githubusercontent.com/u/3099180?v=4)](https://github.com/yanlyan "yanlyan (3 commits)")[![cwilby](https://avatars.githubusercontent.com/u/13686317?v=4)](https://github.com/cwilby "cwilby (1 commits)")[![specialgoodstuff](https://avatars.githubusercontent.com/u/1114907?v=4)](https://github.com/specialgoodstuff "specialgoodstuff (1 commits)")

### Embed Badge

![Health badge](/badges/yanlyan-laravel-convert-case-middleware/health.svg)

```
[![Health](https://phpackages.com/badges/yanlyan-laravel-convert-case-middleware/health.svg)](https://phpackages.com/packages/yanlyan-laravel-convert-case-middleware)
```

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
