PHPackages                             wfeller/laravel-uuid-primary-key - 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. wfeller/laravel-uuid-primary-key

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

wfeller/laravel-uuid-primary-key
================================

Trait to use ordered uuids on your models.

3.2(4y ago)01.0kMITPHPPHP ^7.4|^8.0

Since Nov 17Pushed 4y agoCompare

[ Source](https://github.com/wfeller/laravel-uuid-primary-key)[ Packagist](https://packagist.org/packages/wfeller/laravel-uuid-primary-key)[ Docs](https://github.com/wfeller/laravel-uuid-primary-key)[ RSS](/packages/wfeller-laravel-uuid-primary-key/feed)WikiDiscussions master Synced yesterday

READMEChangelog (9)Dependencies (4)Versions (10)Used By (0)

Uuid primary key
================

[](#uuid-primary-key)

[![Latest Version on Packagist](https://camo.githubusercontent.com/0a88367a0b655bf540162dcce9a24fce37a5b54bc1dc366aae941c92e3d7426e/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f7766656c6c65722f6c61726176656c2d757569642d7072696d6172792d6b65792e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/wfeller/laravel-uuid-primary-key)[![Total Downloads](https://camo.githubusercontent.com/426ab56d9ae9c75483a2945951a3458eacfb745b99682810dea8d64c70bb6893/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f7766656c6c65722f6c61726176656c2d757569642d7072696d6172792d6b65792e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/wfeller/laravel-uuid-primary-key)[![Plant Tree](https://camo.githubusercontent.com/82b7e7c30d073f74b47bbaaf70f5f98792426ff1bea8ee7b05c5879ac56a060c/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f64796e616d69632f6a736f6e3f636f6c6f723d627269676874677265656e266c6162656c3d506c616e74253230547265652671756572793d2532342e746f74616c2675726c3d68747470732533412532462532467075626c69632e6f66667365742e6561727468253246757365727325324674726565776172652532467472656573)](https://plant.treeware.earth/wfeller/laravel-uuid-primary-key)[![Buy us a tree](https://camo.githubusercontent.com/15453546808b5ea47b48633f72f490420e2e41b885556eee95d7e88f4a754418/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f54726565776172652d2546302539462538432542332d6c69676874677265656e3f7374796c653d666f722d7468652d6261646765)](https://plant.treeware.earth/wfeller/laravel-uuid-primary-key)

A trait to use ordered uuids as primary keys on your eloquent models.

Licence
-------

[](#licence)

This package is [Treeware](https://treeware.earth). If you use it in production, then we ask that you [**buy the world a tree**](https://plant.treeware.earth/wfeller/laravel-uuid-primary-key) to thank us for our work. By contributing to the Treeware forest you’ll be creating employment for local families and restoring wildlife habitats.

You can buy trees here [offset.earth/treeware](https://plant.treeware.earth/%7Bvendor%7D/%7Bpackage%7D)

Read more about Treeware at [treeware.earth](http://treeware.earth)

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

[](#installation)

You can install the package via composer:

```
composer require wfeller/laravel-uuid-primary-key
```

Usage
-----

[](#usage)

Add the following trait to your eloquent models:

```
class Car extends \Illuminate\Database\Eloquent\Model
{
    use \WF\UuidPrimaryKey\HasUuidPrimaryKey;

    // ...
}
```

### Testing (todo)

[](#testing-todo)

```
composer test
```

### Changelog

[](#changelog)

Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.

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

[](#contributing)

Please see [CONTRIBUTING](CONTRIBUTING.md) for details.

### Security

[](#security)

If you discover any security related issues, please email me instead of using the issue tracker.

Credits
-------

[](#credits)

- [William](https://github.com/wfeller)
- [All Contributors](../../contributors)

###  Health Score

32

—

LowBetter than 72% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity14

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity72

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 ~148 days

Recently: every ~173 days

Total

9

Last Release

1547d ago

Major Versions

1.2.0 → 2.02019-09-03

2.1 → 3.02020-05-15

PHP version history (3 changes)1.0.0PHP ^7.2

3.0PHP ^7.4

3.1.1PHP ^7.4|^8.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/61f8f46bedb67ee0a5472bef1ba54cf68f8594514c57404661606721dec7c7d8?d=identicon)[wfeller](/maintainers/wfeller)

---

Top Contributors

[![wfeller](https://avatars.githubusercontent.com/u/21337627?v=4)](https://github.com/wfeller "wfeller (8 commits)")

---

Tags

laraveluuid

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/wfeller-laravel-uuid-primary-key/health.svg)

```
[![Health](https://phpackages.com/badges/wfeller-laravel-uuid-primary-key/health.svg)](https://phpackages.com/packages/wfeller-laravel-uuid-primary-key)
```

###  Alternatives

[grumpydictator/firefly-iii

Firefly III: a personal finances manager.

22.8k69.3k](/packages/grumpydictator-firefly-iii)[hyn/multi-tenant

Run multiple websites using the same laravel installation while keeping tenant specific data separated for fully independant multi-domain setups.

2.6k1.1M9](/packages/hyn-multi-tenant)[livewire/volt

An elegantly crafted functional API for Laravel Livewire.

4195.3M84](/packages/livewire-volt)[firefly-iii/data-importer

Firefly III Data Import Tool.

7545.8k](/packages/firefly-iii-data-importer)[riipandi/laravel-optikey

Use UUID, Ulid, or nanoid as optional or primary key in Laravel.

429.1k](/packages/riipandi-laravel-optikey)[elfsundae/laravel-hashid-uuid

Shorten UUID encoding for Laravel Hashid.

132.5k](/packages/elfsundae-laravel-hashid-uuid)

PHPackages © 2026

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