PHPackages                             rdehnhardt/eloquent-case - 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. rdehnhardt/eloquent-case

ActiveLibrary

rdehnhardt/eloquent-case
========================

rdehnhardt Eloquent Case

8.0.1(4y ago)1652211MITPHPPHP &gt;=5.5.0CI failing

Since Oct 30Pushed 4y ago3 watchersCompare

[ Source](https://github.com/rdehnhardt/eloquent-case)[ Packagist](https://packagist.org/packages/rdehnhardt/eloquent-case)[ RSS](/packages/rdehnhardt-eloquent-case/feed)WikiDiscussions master Synced 2mo ago

READMEChangelog (5)Dependencies (3)Versions (11)Used By (1)

eloquent-case
=============

[](#eloquent-case)

Set attributes to upper or lower case automatically. Recommended for business systems.

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

[](#installation)

Run the following command to get the latest version package

```
composer require rdehnhardt/eloquent-case

```

```
// app/Customer.php
namespace App;

use Illuminate\Database\Eloquent\Model;
use Rdehnhardt\EloquentCase\TransformUpperCase;

class Customer extends Model
{
    use TransformUpperCase;

    /**
     * The attributes that aren't upper case. (optional)
     *
     * @var array
     */
    protected $guardedCase = ['email', 'password'];
}
```

```
// app/Customer.php
namespace App;

use Illuminate\Database\Eloquent\Model;
use Rdehnhardt\EloquentCase\TransformUpperCase;

class Customer extends Model
{
    use TransformLowerCase;

    /**
     * The attributes that aren't lower case. (optional)
     *
     * @var array
     */
    protected $guardedCase = ['name'];
}
```

Contributing
------------

[](#contributing)

Contributions are welcomed; to keep things organized, all bugs and requests should be opened on github issues tab for the main project in the [rdehnhardt/eloquent-case/issues](https://github.com/rdehnhardt/eloquent-case/issues).

All pull requests should be made to the branch Develop, so they can be tested before being merged into the master branch.

Having problems?
----------------

[](#having-problems)

If you are having problems with the use of this package, there is likely someone has faced the same problem. You can find common answers to their problems:

- [Github Issues](https://github.com/rdehnhardt/eloquent-case/issues?page=1&state=closed)

### License

[](#license)

The eloquent-case package is open source software licensed under the [license MIT](http://opensource.org/licenses/MIT)

###  Health Score

32

—

LowBetter than 72% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity21

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity64

Established project with proven stability

 Bus Factor1

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

Every ~253 days

Recently: every ~411 days

Total

9

Last Release

1815d ago

Major Versions

1.0.5 → 6.0.02019-11-14

6.0.0 → 8.0.02021-05-21

### Community

Maintainers

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

---

Top Contributors

[![rdehnhardt](https://avatars.githubusercontent.com/u/7077461?v=4)](https://github.com/rdehnhardt "rdehnhardt (12 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/rdehnhardt-eloquent-case/health.svg)

```
[![Health](https://phpackages.com/badges/rdehnhardt-eloquent-case/health.svg)](https://phpackages.com/packages/rdehnhardt-eloquent-case)
```

###  Alternatives

[fumeapp/modeltyper

Generate TypeScript interfaces from Laravel Models

196277.9k](/packages/fumeapp-modeltyper)[aedart/athenaeum

Athenaeum is a mono repository; a collection of various PHP packages

255.2k](/packages/aedart-athenaeum)

PHPackages © 2026

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