PHPackages                             mykemeynell/laraveluuid - 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. mykemeynell/laraveluuid

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

mykemeynell/laraveluuid
=======================

UUID column functionality for Laravel projects

1.0.3(5y ago)04191PHPPHP &gt;=7.1.0

Since Jun 10Pushed 5y agoCompare

[ Source](https://github.com/mykemeynell/UuidColumn)[ Packagist](https://packagist.org/packages/mykemeynell/laraveluuid)[ RSS](/packages/mykemeynell-laraveluuid/feed)WikiDiscussions master Synced yesterday

READMEChangelog (4)Dependencies (1)Versions (5)Used By (1)

UuidColumn
==========

[](#uuidcolumn)

Easily start using UUID within your Laravel application, rathern than the default auto incrementing ID.

Install with Composer
---------------------

[](#install-with-composer)

```
composer require mykemeynell/laraveluuid

```

Usage
-----

[](#usage)

1. Add a UUID column into your migration, for example the default "create users" migration.

```
use ...;

class CreateUsersTable extends Migration
{
  // Include the UuidColumn trait into your migration class.
  // This will give you access to the necessary method to easily
  // create the appropriate column.
  use \UuidColumn\Concern\UuidColumn;

  public function up()
  {
    Schema::create('users', function(Blueprint $table) {

      // Calling the createUuidColumn() method will add the column into your migration.
      // You can migrate this normally with PHP Artisan.
      $this->createUuidColumn($table, 'id);

      ...

```

2. Add the `HasUUidObserver` trait to your Model. For example, on the default User model at `app/User.php`.

```
use ...;
use UuidColumn\Concern\HasUuidObserver;

class User extends Authenticatable
{
    use ..., HasUuidObserver;

    ...
```

3. You'll need to change the defaults in the model to reflect the new key type and behaviour:

```
class User extends Authenticatable
{
    ...

    /**
     * Indicates if the IDs are auto-incrementing.
     *
     * @var bool
     */
    public $incrementing = false;

    /**
     * The "type" of the primary key ID.
     *
     * @var string
     */
    protected $keyType = 'string';

    ...
```

That's it! When new records are created, a new UUID4 string will be set at the ID.

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity12

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity57

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

Every ~136 days

Total

4

Last Release

2120d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/494de8188ad97403b72e40e385235a74ef6331aa2710b3727193f646189af9fc?d=identicon)[mykemeynell](/maintainers/mykemeynell)

---

Top Contributors

[![mykemeynell](https://avatars.githubusercontent.com/u/1590190?v=4)](https://github.com/mykemeynell "mykemeynell (5 commits)")

---

Tags

laraveldatabaseuuid column

### Embed Badge

![Health badge](/badges/mykemeynell-laraveluuid/health.svg)

```
[![Health](https://phpackages.com/badges/mykemeynell-laraveluuid/health.svg)](https://phpackages.com/packages/mykemeynell-laraveluuid)
```

###  Alternatives

[bosnadev/database

Eloquent Extended, added some PostgreSQL features

811.8M3](/packages/bosnadev-database)[nunomaduro/laravel-optimize-database

Publishes migrations that make your database production ready.

26123.0k](/packages/nunomaduro-laravel-optimize-database)[weebly/laravel-mutate

Mutate Laravel attributes

1354.7k](/packages/weebly-laravel-mutate)[hpolthof/laravel-translations-db

A database translations implementation for Laravel 5.

545.8k](/packages/hpolthof-laravel-translations-db)[cubettech/lacassa

Cassandra based query builder for laravel.

358.5k](/packages/cubettech-lacassa)[jrsaunders/shard-matrix

A Complete Database Sharding system for MYSQL and/or Postgres. Using Laravels Query Builder easily scale up your application. Configure your whole solution in one Yaml Config file.

271.5k](/packages/jrsaunders-shard-matrix)

PHPackages © 2026

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