New

Just launched: Vueblocks, a brand-new search engine for Vue packages! Explore Vueblocks →

stayallive/laravel-eloquent-uuid

Generate UUID for a Laravel Eloquent model attribute.
72,996 4

Larablocks Analysis

stayallive/laravel-eloquent-uuid works with Laravel 9 to 13 (latest release v1.0.5, Mar 18, 2026).

Recommendation checks

Solid choice

Solid choice: maintained and up to date, meets 2 of 4 checks; below the bar for Recommended on use.

  • Works with Laravel 13, the current version
  • Released in the last 12 months (Mar 18, 2026)
  • 1,358 downloads a month (needs 10,000)
  • 4 GitHub stars (needs 100)

State

Maintained
  • Last stable release: Mar 18, 2026.
  • 1 release in the last 12 months.
  • First released: Feb 28, 2022.
  • Monthly downloads: 1,358, down 89% from six months ago.
  • 0 open issues on GitHub.

Data from Packagist and GitHub, checked by Larablocks on Dec 1, 2026.

Install
composer require stayallive/laravel-eloquent-uuid
Latest Version:v1.0.5
PHP:^8.0.2
Laravel:9 – 13
License:MIT
Last Updated:Mar 18, 2026
Links: GitHub  ·  Packagist
Maintainer: stayallive

Laravel Eloquent UUID

Latest Version Software License Build Status Total Downloads

Generate UUID for a Laravel Eloquent model attribute.

Note This package still works great, however since Laravel 10 this package is no longer needed as Laravel now has a built-in UUID/ULID traits that work much the same as this package. Read more about UUID/ULID in the Laravel documentation.

Installation

composer require stayallive/laravel-eloquent-uuid

Usage

Adding the UsesUUID trait will ensure that the key attribute will be filled with a UUID.

<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Model;
use Stayallive\Laravel\Eloquent\UUID\UsesUUID;

class SomeModel extends Model
{
    use UsesUUID;

    /**
     * This method is not needed but can be used to override which attribute is filled with the UUID.
     */
    public function getUUIDAttributeName(): string
    {
        return $this->getKeyName();
    }
}

Security Vulnerabilities

If you discover a security vulnerability within this package, please send an e-mail to Alex Bouma at alex+security@bouma.me. All security vulnerabilities will be swiftly addressed.

License

This package is open-sourced software licensed under the MIT license.

Related Packages

marquine/eloquent-uuid

Uuid primary key for Laravel Eloquent Models

11,576 7
theprivateer/eloquent-uuid

UUID utility traits for Laravel

7,181 1
imcity-tech/laravel-uuid

[fork] The package provides UUID keys functionality for Eloquent models with one...

1,694 0
dyrynda/laravel-model-uuid

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

3,631,957 483
joelshepherd/create-with

Easily add common unique identity fields to Laravel models.

5,775 5

Version History

Version Released PHP Laravel License
v1.0.5 ^8.0.2 ^9|^10|^11|^12|^13 MIT
v1.0.4 ^8.0.2 ^9|^10|^11|^12 MIT
v1.0.3 ^8.0.2 ^9|^10|^11 MIT
v1.0.2 ^8.0.2 ^9.0|^10 MIT
v1.0.1 ^8.0.2 ^9.0 MIT