gbuckingham89/eloquent-uuid
Larablocks Analysis
gbuckingham89/eloquent-uuid works with Laravel 5 to 10 (latest release 3.5.0, Jul 21, 2023), all past end of life (the last on Feb 4, 2025): no more fixes, even for security.
Recommendation checks
Not advisedNot advised: no release or commit in over 2 years.
- No release or commit in over 2 years
- Supports only Laravel 5 to 10, past end of life since Feb 4, 2025
- No release in the last 12 months (last: Jul 21, 2023)
- 128 downloads a month (needs 10,000)
- 1 GitHub star (needs 100)
State
Likely abandoned- No release or commit in over 2 years.
- Last stable release: Jul 21, 2023.
- No releases in the last 12 months.
- First released: Jan 25, 2017.
- Monthly downloads: 128, up 4167% from six months ago.
- 0 open issues on GitHub.
Data from Packagist and GitHub, checked by Larablocks on Dec 1, 2026.
| Install | |
|---|---|
composer require gbuckingham89/eloquent-uuid |
|
| Latest Version: | 3.5.0 |
| PHP: | ^7.1|^8.0 |
| Laravel: | 5 – 10 |
| License: | MIT |
| Last Updated: | Jul 21, 2023 |
| Links: | GitHub · Packagist |
gbuckingham89/eloquent-uuid v3
A simple package for using UUID's with Laravel's Eloquent models. By including the trait on your models, they will automatically get given a time ordered UUIDv4 for their key (ID) when being persisted to the database.
The current version requires Laravel 5.6 (PHP 7.1) or greater. If you're using an older version of Laravel, please see v1 of this package.
Installation
composer require gbuckingham89/eloquent-uuid
Use
Make sure your database table(s) are setup to handle UUID's. Laravel has a method called uuid() which you can use in your migrations. You will probably want the field to be unique too.
Schema::create('users', function (Blueprint $table) {
$table->uuid('id')->unique();
// Other fields here...
});
At the top of your model(s) you simply need to include a trait:
<?php
namespace App;
use Gbuckingham89\EloquentUuid\Traits\UuidForKey;
use Illuminate\Database\Eloquent\Model;
class User extends Eloquent
{
use UuidForKey;
}
Copyright and license
Code and documentation copyright George Buckingham.
Code released under the MIT License.
Related Packages
A simple drop-in solution for providing UUID and ULID support for the IDs of you...
[fork] The package provides UUID keys functionality for Eloquent models with one...
Version History
| Version | Released | PHP | Laravel | License |
|---|---|---|---|---|
| 3.5.0 | ^7.1| | ^5.6| | MIT | |
| 3.4.0 | ^7.1| | ^5.6| | MIT | |
| 3.3.0 | ^7.1| | ^5.6| | MIT | |
| 3.2.0 | ^7.1 | ^5.6| | MIT | |
| 3.1.0 | ^7.1 | ^5.6| | MIT | |
| 3.0.0 | ^7.1 | ^5.6| | MIT | |
| 2.0.0 | >=7.0 | ^5.6 | MIT | |
| 1.0.1 | ^5.3 | MIT | ||
| 1.0.0 | ^5.3 | MIT |