PHPackages                             kdaws-com/laravel-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. kdaws-com/laravel-uuid

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

kdaws-com/laravel-uuid
======================

Eloquent UUID Trait for Laravel

1.0.0(4y ago)011MITPHPPHP ^8.0

Since Sep 20Pushed 4y ago1 watchersCompare

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

READMEChangelogDependencies (6)Versions (2)Used By (0)

laravel-uuid
============

[](#laravel-uuid)

[![Latest Version on Packagist](https://camo.githubusercontent.com/e414679edaa20d051277488a234699f7be92f8d0bc4fe0d96f68c495d13fb53d/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6b646177732d636f6d2f6c61726176656c2d757569642e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/kdaws-com/laravel-uuid)[![GitHub Tests Action Status](https://camo.githubusercontent.com/3bac2fa254d6bdd67cd95c1febbada91c92b60b87ba76f8ac83bc3bffd8476fc/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f776f726b666c6f772f7374617475732f6b646177732d636f6d2f6c61726176656c2d757569642f72756e2d74657374733f6c6162656c3d7465737473)](https://github.com/kdaws-com/laravel-uuid/actions?query=workflow%3Arun-tests+branch%3Amain)[![GitHub Code Style Action Status](https://camo.githubusercontent.com/8f453468229723f0dc67d13f760130581fde654f2304f41c4aadcefdd306e540/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f776f726b666c6f772f7374617475732f6b646177732d636f6d2f6c61726176656c2d757569642f436865636b253230262532306669782532307374796c696e673f6c6162656c3d636f64652532307374796c65)](https://github.com/kdaws-com/laravel-uuid/actions?query=workflow%3A%22Check+%26+fix+styling%22+branch%3Amain)[![Total Downloads](https://camo.githubusercontent.com/4eb97dec94b1272015b2842d24d93c559c154f4384d929542f93fc33efe8a15b/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6b646177732d636f6d2f6c61726176656c2d757569642e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/kdaws-com/laravel-uuid)

A pair of Eloquent Model Traits for dealing with orderable UUID primary or secondary keys.

Usage
-----

[](#usage)

### Primary Keys

[](#primary-keys)

*Model*

```
Use \KDAWScom\LaravelUuid\HasUuidPrimary;

class MyModel extends Model
{
    Use HasUuidPrimary;
}

```

*Migration*

```
return new class extends Migration
{
    public function up()
    {
        Schema::create('my_models', function (Blueprint $table) {
            $table->string('id', 36)->primary();

            // OR

            $table->string('myKeyNameWillBeAutoDiscovered', 36)->primary();
        }
    }
}

```

### Secondary Keys

[](#secondary-keys)

*Model*

```
Use \KDAWScom\LaravelUuid\HasUuidSecondarys;

class MyModel extends Model
{
    Use HasUuidSecondary;
}

```

*Migration*

```
return new class extends Migration
{
    public function up()
    {
        Schema::create('my_models', function (Blueprint $table) {
            /**
             * Default key name is uuid
             */
            $table->string('uuid', 36);

            /**
             * You can also set your own key name, but you must remember to set the value of:
             *
             * $laravelUuidSecondaryKeyName
             *
             * to the key name inside your models boot routine
             */

            $table->string('myUuidKey', 36);
        }
    }
}

```

###  Health Score

24

—

LowBetter than 31% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity5

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity56

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

Unknown

Total

1

Last Release

1746d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/18269f368af84dafbb19073ce28244b5ca01971c6c15adf8e9584eca314b93ae?d=identicon)[KarlAustin](/maintainers/KarlAustin)

---

Top Contributors

[![KarlAustin](https://avatars.githubusercontent.com/u/5338970?v=4)](https://github.com/KarlAustin "KarlAustin (1 commits)")

---

Tags

laravellaravel-uuidKDAWS-com

###  Code Quality

TestsPest

Code StylePHP CS Fixer

### Embed Badge

![Health badge](/badges/kdaws-com-laravel-uuid/health.svg)

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

###  Alternatives

[spatie/laravel-medialibrary

Associate files with Eloquent models

6.1k43.2M626](/packages/spatie-laravel-medialibrary)[mongodb/laravel-mongodb

A MongoDB based Eloquent model and Query builder for Laravel

7.1k8.4M94](/packages/mongodb-laravel-mongodb)[psalm/plugin-laravel

Psalm plugin for Laravel

3355.3M346](/packages/psalm-plugin-laravel)[yajra/laravel-oci8

Oracle DB driver for Laravel via OCI8

8793.2M25](/packages/yajra-laravel-oci8)[kirschbaum-development/eloquent-power-joins

The Laravel magic applied to joins.

1.6k32.6M46](/packages/kirschbaum-development-eloquent-power-joins)[glushkovds/phpclickhouse-laravel

Adapter of the most popular library https://github.com/smi2/phpClickHouse to Laravel

2051.5M1](/packages/glushkovds-phpclickhouse-laravel)

PHPackages © 2026

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