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.5

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 4d 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 54% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity18

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity52

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

2131d 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.

4802.8M8](/packages/dyrynda-laravel-model-uuid)[spiritix/lada-cache

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

591444.8k2](/packages/spiritix-lada-cache)[waad/laravel-model-metadata

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

823.1k](/packages/waad-laravel-model-metadata)[weebly/laravel-mutate

Mutate Laravel attributes

1354.7k](/packages/weebly-laravel-mutate)[rayvenues/eloquent-model-generator

Eloquent Model Generator

1325.2k1](/packages/rayvenues-eloquent-model-generator)[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.

3516.7k3](/packages/wayofdev-laravel-cycle-orm-adapter)

PHPackages © 2026

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