PHPackages                             larapkg/laravel-keychanger - 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. larapkg/laravel-keychanger

ActiveProject

larapkg/laravel-keychanger
==========================

PhpKeyChanger allows you to pass a json string, object or an array and it will recursively re-key the array using the case you give it.

v1.0.0(5y ago)14MITPHPPHP &gt;=7.4

Since Aug 20Pushed 5y ago2 watchersCompare

[ Source](https://github.com/LaraPKG/laravel-keychanger)[ Packagist](https://packagist.org/packages/larapkg/laravel-keychanger)[ RSS](/packages/larapkg-laravel-keychanger/feed)WikiDiscussions master Synced yesterday

READMEChangelog (1)Dependencies (2)Versions (3)Used By (0)

Laravel KeyChanger
==================

[](#laravel-keychanger)

[![Codacy Badge](https://camo.githubusercontent.com/7582f12d7aa87db3a9fc45f653704d26980006e87c1cbb5f2c73e85c79601c7f/68747470733a2f2f6170692e636f646163792e636f6d2f70726f6a6563742f62616467652f47726164652f6431613833643339316333323464386462333235656136376164353435616236)](https://app.codacy.com/gh/LaraPKG/laravel-keychanger?utm_source=github.com&utm_medium=referral&utm_content=LaraPKG/laravel-keychanger&utm_campaign=Badge_Grade_Dashboard)[![Build Status](https://camo.githubusercontent.com/a2a4179f98d217c322778dd62be1d0b2bc1c919340ec7b2ee0bb3230c0d6cbad/68747470733a2f2f7472617669732d63692e636f6d2f4c617261504b472f6c61726176656c2d6b65796368616e6765722e7376673f6272616e63683d6d6173746572)](https://travis-ci.com/LaraPKG/laravel-keychanger)

KeyChanger allows you to pass a json string, object or an array and it will recursively re-key it using the case you give it. This package was created to handle situation like `$someImportedData->SomeKey` so we can use a nice `$someImportedData->someKey` for example, to assist in readable clean code.

- Camel Case
- Pascal Case
- Snake Case
- Kebab Case
- Studly Case

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

[](#installation)

*Note:* Php key changer requires php ^7.4

`composer require larapkg/laravel-keychanger`

Usage
-----

[](#usage)

`$reKeyed = KeyChanger::reKey($array, 'snake');`

You can use any of the above cases, and you can pass in an object, a Json string or an Array, it will be return the same type that you pass in.

Credits
-------

[](#credits)

I used `Illuminate\Support\Str` as the basis of the StringConverters class`, many thanks Taylor Otwell and all contributors.

###  Health Score

25

—

LowBetter than 37% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity5

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity56

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 92.9% 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.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

2090d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/6e2afdd94a6f21a4ec2c5df569b80c1d47d6f5d0428f866f55c4bc117856b58b?d=identicon)[Ron Appleton](/maintainers/Ron%20Appleton)

![](https://www.gravatar.com/avatar/d7e3b21e503e817f4cfc33ec499094021ff6a66bbfa268332b2159c2af745c6c?d=identicon)[pdawson](/maintainers/pdawson)

---

Top Contributors

[![ronappleton](https://avatars.githubusercontent.com/u/3792420?v=4)](https://github.com/ronappleton "ronappleton (13 commits)")[![codacy-badger](https://avatars.githubusercontent.com/u/23704769?v=4)](https://github.com/codacy-badger "codacy-badger (1 commits)")

### Embed Badge

![Health badge](/badges/larapkg-laravel-keychanger/health.svg)

```
[![Health](https://phpackages.com/badges/larapkg-laravel-keychanger/health.svg)](https://phpackages.com/packages/larapkg-laravel-keychanger)
```

PHPackages © 2026

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