PHPackages                             bdelespierre/laravel-has-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. bdelespierre/laravel-has-uuid

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

bdelespierre/laravel-has-uuid
=============================

Provides support for UUID key type in Eloquent models

v1.2.1(2y ago)4619—8.3%MITPHPPHP ^7.1|^8.0CI failing

Since Aug 23Pushed 2y ago1 watchersCompare

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

READMEChangelogDependencies (4)Versions (5)Used By (0)

 [![HasUuid Example](https://raw.githubusercontent.com/bdelespierre/laravel-has-uuid/master/demo.png)](https://raw.githubusercontent.com/bdelespierre/laravel-has-uuid/master/demo.png)

Laravel Has UUID
================

[](#laravel-has-uuid)

[![Latest Version on Packagist](https://camo.githubusercontent.com/c7442066253fcf0f070fa2485da42735d4ad031a036143fa3173255e2f72b331/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6264656c65737069657272652f6c61726176656c2d6861732d757569642e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/bdelespierre/laravel-has-uuid)[![Total Downloads](https://camo.githubusercontent.com/b89d133d5ab2e5feae48f77c225219f6fff2f29533fa84fbc45b87c21ee6ef51/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6264656c65737069657272652f6c61726176656c2d6861732d757569642e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/bdelespierre/laravel-has-uuid)[![Build Status](https://camo.githubusercontent.com/bf669b038d17aec3e83663fb340af7b09583b9cc68eae33cb77366f89c95dec2/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f6264656c65737069657272652f6c61726176656c2d6861732d757569642f6d61737465722e7376673f7374796c653d666c61742d737175617265)](https://travis-ci.org/bdelespierre/laravel-has-uuid)[![StyleCI](https://camo.githubusercontent.com/588dcae81e1171d6bf55745c8091a536d29e64fc2b9e793d246f9d519a43abc5/68747470733a2f2f7374796c6563692e696f2f7265706f732f3134353838343437352f736869656c64)](https://styleci.io/repos/145884475)[![Quality Score](https://camo.githubusercontent.com/53afff1bfc590e57d916fbbd0f05959834cbfcab614e77229b271758afd06eb2/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f672f6264656c65737069657272652f6c61726176656c2d6861732d757569642e7376673f7374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/bdelespierre/laravel-has-uuid)

Provides support for UUID primary keys in Eloquent models. Built on top of [webpatser/laravel-uuid](https://github.com/webpatser/laravel-uuid) ❤️

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

[](#installation)

Via Composer

```
$ composer require bdelespierre/laravel-has-uuid
```

Usage
-----

[](#usage)

```
namespace App\Models;

use Bdelespierre\HasUuid\HasUuid;
use Illuminate\Database\Eloquent\Model;

class User extends Model
{
    use HasUuid;
}
```

Migration:

```
Schema::create('users', function (Blueprint $table) {
    $table->uuid('id')->primary();
    // other properties go here...
});
```

Change log
----------

[](#change-log)

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

Testing
-------

[](#testing)

```
$ composer test
```

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

[](#contributing)

Please see [contributing.md](CONTRIBUTING.md) for details and a todolist.

Security
--------

[](#security)

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

Credits
-------

[](#credits)

- [Benjamin Delespierre](https://github.com/bdelespierre)
- [All Contributors](https://github.com/bdelespierre/laravel-has-uuid/graphs/contributors%5D)

License
-------

[](#license)

MIT. Please see the [license file](LICENSE.md) for more information.

###  Health Score

33

—

LowBetter than 72% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity20

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity70

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

Total

4

Last Release

992d ago

PHP version history (2 changes)v1.1.0PHP ^7.0|^8.0

v1.2.0PHP ^7.1|^8.0

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/1086339?v=4)[Benjamin Delespierre](/maintainers/bdelespierre)[@bdelespierre](https://github.com/bdelespierre)

---

Top Contributors

[![bdelespierre](https://avatars.githubusercontent.com/u/1086339?v=4)](https://github.com/bdelespierre "bdelespierre (21 commits)")

---

Tags

laravelphpphp7uuiduuid4laravelmodeleloquentuuid

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/bdelespierre-laravel-has-uuid/health.svg)

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

###  Alternatives

[mongodb/laravel-mongodb

A MongoDB based Eloquent model and Query builder for Laravel

7.1k8.0M88](/packages/mongodb-laravel-mongodb)[dyrynda/laravel-model-uuid

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

4833.0M9](/packages/dyrynda-laravel-model-uuid)[tucker-eric/eloquentfilter

An Eloquent way to filter Eloquent Models

1.8k5.0M31](/packages/tucker-eric-eloquentfilter)[spiritix/lada-cache

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

591452.8k2](/packages/spiritix-lada-cache)[highsolutions/eloquent-sequence

A Laravel package for easy creation and management sequence support for Eloquent models with elastic configuration.

121134.8k](/packages/highsolutions-eloquent-sequence)[lemaur/eloquent-publishing

207.8k1](/packages/lemaur-eloquent-publishing)

PHPackages © 2026

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