PHPackages                             bmatovu/laravel-eloquent-uuid - 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. bmatovu/laravel-eloquent-uuid

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

bmatovu/laravel-eloquent-uuid
=============================

Laravel Eloquent UUID.

v1.1.0(5y ago)38.1kMITPHPPHP &gt;=5.6.4

Since Dec 29Pushed 3y agoCompare

[ Source](https://github.com/mtvbrianking/laravel-eloquent-uuid)[ Packagist](https://packagist.org/packages/bmatovu/laravel-eloquent-uuid)[ Docs](https://github.com/mtvbrianking/laravel-eloquent-uuid)[ RSS](/packages/bmatovu-laravel-eloquent-uuid/feed)WikiDiscussions master Synced 3w ago

READMEChangelog (4)Dependencies (7)Versions (5)Used By (0)

**THIS PACKAGE IS NOT MAINTAINED ANYMORE...**

LARAVEL HAS INTRODUCTED [UUID &amp; ULID](https://laravel.com/docs/9.x/eloquent#uuid-and-ulid-keys) SUPPORT IN THE CORE STARTING WITH LARAVEL V9

---

Laravel Eloquent UUID.
======================

[](#laravel-eloquent-uuid)

[![Build Status](https://camo.githubusercontent.com/4f5032cd3610401b6e32cfde33a3eba36367192e2c384d34bfd4c8aeaa3c2ef4/68747470733a2f2f7472617669732d63692e6f72672f6d7476627269616e6b696e672f6c61726176656c2d656c6f7175656e742d757569642e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/mtvbrianking/laravel-eloquent-uuid)[![Scrutinizer Code Quality](https://camo.githubusercontent.com/e6e353dd7ec767100de640d6fa5217920b1aa3d2bf62e4676e35cbb154b4546e/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f6d7476627269616e6b696e672f6c61726176656c2d656c6f7175656e742d757569642f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/mtvbrianking/laravel-eloquent-uuid/?branch=master)[![Code Coverage](https://camo.githubusercontent.com/765b433dad10c96fde82aeb441a394e4d1631f12e5be1de9c9bf632dacb3e6f4/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f6d7476627269616e6b696e672f6c61726176656c2d656c6f7175656e742d757569642f6261646765732f636f7665726167652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/mtvbrianking/laravel-eloquent-uuid/?branch=master)[![StyleCI](https://camo.githubusercontent.com/81c51376b4db2c2d29c153be6beb3ea777c8fd366da43a16e6e9d78350c0ddaf/68747470733a2f2f6769746875622e7374796c6563692e696f2f7265706f732f3233303630373336382f736869656c643f6272616e63683d6d6173746572)](https://github.styleci.io/repos/230607368)[![Documentation](https://camo.githubusercontent.com/70c5babcdd071a16af5cf30083ca75172d1117c028397189392c688efcf6f25a/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f446f63756d656e746174696f6e2d426c7565)](https://mtvbrianking.github.io/laravel-eloquent-uuid)

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

[](#installation)

Install via Composer package manager:

```
composer require bmatovu/laravel-eloquent-uuid
```

Usage
-----

[](#usage)

**Migration**:

```
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

class CreateClientsTable extends Migration
{
    public function up()
    {
        Schema::create('clients', function (Blueprint $table) {
            $table->uuid('id');
            $table->string('name');
            // ...
            $table->timestamps();

            $table->primary('id');
        });
    }
}
```

**Model**:

```
use Bmatovu\Uuid\Traits\HasUuidKey;
use Illuminate\Database\Eloquent\Model;

class Client extends Model
{
    use HasUuidKey;

    /**
     * The "type" of the primary key ID.
     *
     * @var string
     */
    protected $keyType = 'string';

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

Testing
-------

[](#testing)

**Factories fail after faking events**: ([Issue #19952](https://github.com/laravel/framework/issues/19952))

After calling `Event::fake()`, no event listeners will be executed. So, if your tests use model factories that use the `HasUuidKey` trait; you should call Event::fake() after using your factories.

###  Health Score

30

—

LowBetter than 62% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity26

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity55

Maturing project, gaining track record

 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

Total

4

Last Release

1925d ago

Major Versions

v0.0.2 → v1.0.02020-06-10

### Community

Maintainers

![](https://www.gravatar.com/avatar/0cc99b58d12a288f0fd19099cc3c724ff4df84d978df0e7451b650e8182bc919?d=identicon)[bmatovu](/maintainers/bmatovu)

---

Top Contributors

[![mtvbrianking](https://avatars.githubusercontent.com/u/5412360?v=4)](https://github.com/mtvbrianking "mtvbrianking (13 commits)")

---

Tags

eloquentlaravelmodelsprimary-keyuuidlaravelmodeleloquentuuid

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/bmatovu-laravel-eloquent-uuid/health.svg)

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

###  Alternatives

[mongodb/laravel-mongodb

A MongoDB based Eloquent model and Query builder for Laravel

7.1k8.0M88](/packages/mongodb-laravel-mongodb)[kirschbaum-development/eloquent-power-joins

The Laravel magic applied to joins.

1.6k29.9M42](/packages/kirschbaum-development-eloquent-power-joins)[dyrynda/laravel-model-uuid

This package allows you to easily work with UUIDs in your Laravel models.

4833.0M9](/packages/dyrynda-laravel-model-uuid)[spiritix/lada-cache

A Redis based, automated and scalable database caching layer for Laravel

591452.8k2](/packages/spiritix-lada-cache)[psalm/plugin-laravel

Psalm plugin for Laravel

3345.1M337](/packages/psalm-plugin-laravel)[cybercog/laravel-love

Make Laravel Eloquent models reactable with any type of emotions in a minutes!

1.2k322.4k1](/packages/cybercog-laravel-love)

PHPackages © 2026

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