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

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

kadevland/simple-laravel-eloquent-uuid
======================================

A simple Trait provides the ability to use UUID generator in your Eloquent models

v1.0.1(5y ago)131301MITPHPPHP ^7.2.5CI failing

Since Jun 30Pushed 5y ago2 watchersCompare

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

READMEChangelog (3)Dependencies (4)Versions (4)Used By (0)

simple-laravel-eloquent-uuid
============================

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

A simple Trait to provide UUID support for your Eloquent models

A simple, automatic UUID generator for any model based on Laravel 7 and above, By using this package when each new entry you will get the following :

- Generate `uuid` automatically .
- Assign it to `uuid` field in database automatically.
- easy find it based `uuid` method.

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

[](#installation)

You can install the package via Composer:

```
 composer require kadevland/simple-laravel-eloquent-uuid
```

Usage
-----

[](#usage)

There are two ways to use this package:

- with `uuid` in string format `Kadevland\Eloquent\Uuid\Traits\HasUuid`
- with `uuid` in bytes format `Kadevland\Eloquent\Uuid\Traits\HasByteUuid`

Import trait and set key type string or uuid if use string format.

> By default UUID versions is v4
>
> You can also specify v1 UUIDs to be used by setting in config file.

### Uuid string format

[](#uuid-string-format)

#### Models

[](#models)

Use the HasUuid trait:

```
use Illuminate\Database\Eloquent\Model;
use Kadevland\Eloquent\Uuid\Traits\HasUuid;

class ExampleModel extends Model
{
  use HasUuid;

  protected $keyType = 'uuid';
  /* or
  protected $keyType = 'string';
  */
}
```

### Uuid bytes format

[](#uuid-bytes-format)

#### Models

[](#models-1)

Use the HasByteUuid trait:

```
use Illuminate\Database\Eloquent\Model;
use Kadevland\Eloquent\Uuid\Traits\HasByteUuid;

class ExampleModel extends Model
{
  use HasByteUuid;

  protected $keyType = 'string';

}
```

\##Config

You can publish the config file with:

```
php artisan vendor:publish --provider="kadevland/simple-laravel-eloquent-uuid" --tag="config"
```

### Testing

[](#testing)

```
composer test
```

### Changelog

[](#changelog)

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

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

28

—

LowBetter than 52% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity18

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity53

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 83.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 ~7 days

Total

3

Last Release

2180d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/f9789c85320e3dfb98dfedffa61765104826b5c8e5483bb5d8d520688756f411?d=identicon)[kadevland](/maintainers/kadevland)

---

Top Contributors

[![kadevland](https://avatars.githubusercontent.com/u/1887658?v=4)](https://github.com/kadevland "kadevland (26 commits)")[![felixdorn](https://avatars.githubusercontent.com/u/55788595?v=4)](https://github.com/felixdorn "felixdorn (5 commits)")

---

Tags

phplaraveldatabasegeneratormodeleloquentuuidlaravel-uuideloquent-uuidramsey uuidsimple-laravel-eloquent-uuiddatabase uuidsimple uuid

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

###  Alternatives

[dyrynda/laravel-model-uuid

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

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

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

592456.3k1](/packages/spiritix-lada-cache)[laravel-clickhouse/laravel-clickhouse

A ClickHouse based Eloquent model and Query builder for Laravel

20615.6k](/packages/laravel-clickhouse-laravel-clickhouse)[waad/laravel-model-metadata

A robust Laravel package for handling metadata with JSON casting, custom relation names, and advanced querying capabilities.

854.6k](/packages/waad-laravel-model-metadata)[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.

3535.8k3](/packages/wayofdev-laravel-cycle-orm-adapter)[designmynight/laravel-elasticsearch

Use Elasticsearch as a database in Laravel to retrieve Eloquent models and perform aggregations.

3142.2k](/packages/designmynight-laravel-elasticsearch)

PHPackages © 2026

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