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

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

vistag/eloquent-uuid
====================

Eloquent models UUID traits

0248PHP

Since Feb 6Pushed 8y agoCompare

[ Source](https://github.com/VistagGit/eloquent-uuid)[ Packagist](https://packagist.org/packages/vistag/eloquent-uuid)[ RSS](/packages/vistag-eloquent-uuid/feed)WikiDiscussions master Synced today

READMEChangelogDependenciesVersions (1)Used By (0)

Laravel Eloquent UUID Traits
============================

[](#laravel-eloquent-uuid-traits)

Laravel package with Eloquent models UUID1 and UUID4 traits that will let you generate UUIDs for your Eloquent models automatically.

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

[](#installation)

You can install this package via composer using this command:

```
 composer require vistag/eloquent-uuid
```

Usage
-----

[](#usage)

### Models

[](#models)

To set up a model to use UUID, simply use HasUuid1 or HasUuid4 trait.

#### UUID1 Example

[](#uuid1-example)

```
use Illuminate\Database\Eloquent\Model;
use Vistag\EloquentUuid\HasUuid1;

class Item extends Model
{
  use HasUuid1;

  ....

}
```

#### UUID4 Example

[](#uuid4-example)

```
use Illuminate\Database\Eloquent\Model;
use Vistag\EloquentUuid\HasUuid4;

class Item extends Model
{
  use HasUuid4;

  ....

}
```

Support
-------

[](#support)

If you believe you have found an issue, please report it using the [GitHub issue tracker](https://github.com/VistagGit/eloquent-uuid/issues), or better yet, fork the repository and submit a pull request.

If you're using this package, I'd love to hear your thoughts. Thanks!

License
-------

[](#license)

The MIT License (MIT). [Vistag.com](https://vistag.com)

###  Health Score

22

—

LowBetter than 22% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity11

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

 Bus Factor1

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

### Community

Maintainers

![](https://www.gravatar.com/avatar/5340ba8a7477c30ad3bb88b15878a056228a0280182330f2d63c82bf6d2f1fdb?d=identicon)[vistag](/maintainers/vistag)

---

Top Contributors

[![rorecek](https://avatars.githubusercontent.com/u/6564004?v=4)](https://github.com/rorecek "rorecek (7 commits)")[![VistagGit](https://avatars.githubusercontent.com/u/35762264?v=4)](https://github.com/VistagGit "VistagGit (1 commits)")

### Embed Badge

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

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

###  Alternatives

[doctrine/orm

Object-Relational-Mapper for PHP

10.2k285.3M6.2k](/packages/doctrine-orm)[jdorn/sql-formatter

a PHP SQL highlighting library

3.9k115.1M102](/packages/jdorn-sql-formatter)[illuminate/database

The Illuminate Database package.

2.8k52.4M9.4k](/packages/illuminate-database)[mongodb/mongodb

MongoDB driver library

1.6k64.0M546](/packages/mongodb-mongodb)[ramsey/uuid-doctrine

Use ramsey/uuid as a Doctrine field type.

90340.3M211](/packages/ramsey-uuid-doctrine)[reliese/laravel

Reliese Components for Laravel Framework code generation.

1.7k3.4M16](/packages/reliese-laravel)

PHPackages © 2026

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