PHPackages                             brokeyourbike/uid-keys - 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. [Database &amp; ORM](/categories/database)
4. /
5. brokeyourbike/uid-keys

ActiveLibrary[Database &amp; ORM](/categories/database)

brokeyourbike/uid-keys
======================

A simple drop-in solution for providing UUID and ULID support for the IDs of your Eloquent models.

0.2.0(4mo ago)01.6k1MPL-2.0PHPPHP ^8.2CI failing

Since Jan 23Pushed 4mo ago1 watchersCompare

[ Source](https://github.com/brokeyourbike/uid-keys-laravel)[ Packagist](https://packagist.org/packages/brokeyourbike/uid-keys)[ GitHub Sponsors](https://github.com/brokeyourbike)[ Fund](https://opencollective.com/brokeyourbike)[ RSS](/packages/brokeyourbike-uid-keys/feed)WikiDiscussions main Synced yesterday

READMEChangelog (4)Dependencies (5)Versions (5)Used By (1)

uid-keys
========

[](#uid-keys)

[![Latest Stable Version](https://camo.githubusercontent.com/d321491b43c7d5547929e1ced74c3ac26f78bdaed2efae92fc246379e56da8e0/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f762f72656c656173652f62726f6b65796f757262696b652f7569642d6b6579732d6c61726176656c)](https://github.com/brokeyourbike/uid-keys-laravel/releases)[![Total Downloads](https://camo.githubusercontent.com/81492b330f9d06785ac3f65d79577fe878854dd1262609c66c126522a51ff95e/68747470733a2f2f706f7365722e707567782e6f72672f62726f6b65796f757262696b652f7569642d6b6579732f646f776e6c6f616473)](https://packagist.org/packages/brokeyourbike/uid-keys)[![codecov](https://camo.githubusercontent.com/8994a0feb8ee56d783b14a8399ce2c7531a5a766d7371677df9a667eca35260d/68747470733a2f2f636f6465636f762e696f2f67682f62726f6b65796f757262696b652f7569642d6b6579732d6c61726176656c2f67726170682f62616467652e7376673f746f6b656e3d756f4169346956304162)](https://codecov.io/gh/brokeyourbike/uid-keys-laravel)

A simple drop-in solution for providing UUID and ULID support for the IDs of your Eloquent models.

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

[](#installation)

```
composer require brokeyourbike/uid-keys
```

Usage
-----

[](#usage)

```
use Illuminate\Database\Eloquent\Model;
use BrokeYourBike\UidKeys\Database\Eloquent\Ulid;

class ExampleModel extends Model
{
    use Ulid;

    /**
     * The "type" of the auto-incrementing ID.
     *
     * @var string
     */
    protected $keyType = 'string';

    /**
     * Indicates if the IDs are auto-incrementing.
     *
     * @var bool
     */
    public $incrementing = false;
}
```

Inspiration
-----------

[](#inspiration)

Code mainly stolen from the [goldspecdigital/laravel-eloquent-uuid](https://github.com/goldspecdigital/laravel-eloquent-uuid) package.

Authors
-------

[](#authors)

- [Ivan Stasiuk](https://github.com/brokeyourbike) | [Twitter](https://twitter.com/brokeyourbike) | [LinkedIn](https://www.linkedin.com/in/brokeyourbike) | [stasi.uk](https://stasi.uk)

License
-------

[](#license)

[Mozilla Public License v2.0](https://github.com/brokeyourbike/uid-keys-laravel/blob/main/LICENSE)

###  Health Score

42

—

FairBetter than 90% of packages

Maintenance76

Regular maintenance activity

Popularity15

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity55

Maturing project, gaining track record

 Bus Factor1

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

Every ~480 days

Total

4

Last Release

129d ago

PHP version history (2 changes)0.1.0PHP ^8.1

0.2.0PHP ^8.2

### Community

Maintainers

![](https://www.gravatar.com/avatar/114f3c6e8506e0bba763451e8e4bcc3e94d662c2dce982a910b5d7b3444593cf?d=identicon)[brokeyourbike](/maintainers/brokeyourbike)

---

Top Contributors

[![brokeyourbike](https://avatars.githubusercontent.com/u/1554371?v=4)](https://github.com/brokeyourbike "brokeyourbike (15 commits)")[![github-actions[bot]](https://avatars.githubusercontent.com/in/15368?v=4)](https://github.com/github-actions[bot] "github-actions[bot] (4 commits)")

---

Tags

eloquenthacktoberfestlaravellaravel-packagelaravel-packagesphpphp8uliduuidphplaraveleloquentuuidulid

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/brokeyourbike-uid-keys/health.svg)

```
[![Health](https://phpackages.com/badges/brokeyourbike-uid-keys/health.svg)](https://phpackages.com/packages/brokeyourbike-uid-keys)
```

###  Alternatives

[goldspecdigital/laravel-eloquent-uuid

A simple drop-in solution for providing UUID support for the IDs of your Eloquent models.

5111.3M9](/packages/goldspecdigital-laravel-eloquent-uuid)[anourvalar/eloquent-serialize

Laravel Query Builder (Eloquent) serialization

11320.2M21](/packages/anourvalar-eloquent-serialize)[langleyfoxall/xero-laravel

💸 Access the Xero accounting system using an Eloquent-like syntax

86235.1k](/packages/langleyfoxall-xero-laravel)[wayofdev/laravel-cycle-orm-adapter

🔥 A Laravel adapter for CycleORM, providing seamless integration of the Cycle DataMapper ORM for advanced database handling and object mapping in PHP applications.

3516.7k3](/packages/wayofdev-laravel-cycle-orm-adapter)[salehhashemi/laravel-repository

Implementing the repository pattern for Laravel projects.

2010.5k](/packages/salehhashemi-laravel-repository)[jrsaunders/shard-matrix

A Complete Database Sharding system for MYSQL and/or Postgres. Using Laravels Query Builder easily scale up your application. Configure your whole solution in one Yaml Config file.

271.5k](/packages/jrsaunders-shard-matrix)

PHPackages © 2026

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