PHPackages                             rollswan/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. [Utility &amp; Helpers](/categories/utility)
4. /
5. rollswan/uuid

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

rollswan/uuid
=============

Generates Universally Unique IDentifiers as primary key

1.0.0(5y ago)0822MITPHP

Since Oct 20Pushed 5y ago1 watchersCompare

[ Source](https://github.com/rollswan-acebedo/uuid)[ Packagist](https://packagist.org/packages/rollswan/uuid)[ RSS](/packages/rollswan-uuid/feed)WikiDiscussions master Synced 1w ago

READMEChangelog (1)DependenciesVersions (2)Used By (2)

Universally Unique IDentifiers (UUID)
=====================================

[](#universally-unique-identifiers-uuid)

A Laravel package to generate uuid as primary keys.

How to use?
-----------

[](#how-to-use)

1. Install `composer require rollswan/uuid`
2. use `uuid()` in migration,

*Example:*

```
Schema::create('posts', function (Blueprint  $table) {
    $table->uuid(); // you can also custom your uuid `uuid('post_uuid')`
    $table->string('title');
    $table->string('body');
    $table->timestamps();
});

```

3. use `WithUuid` trait in your Model and declare the primary key

*Example:*

```
namespace App;

use Rollswan\Uuid\Traits\WithUuid;
use Illuminate\Database\Eloquent\Model;

class Post extends Model
{
    use WithUuid;
    protected $primaryKey = 'uuid';
}

```

Done! This will automatically generate unique UUID whenever you save a new record.

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity9

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity54

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

2036d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/30310708?v=4)[rollswan](/maintainers/rollswan)[@Rollswan](https://github.com/Rollswan)

---

Top Contributors

[![rollswan-acebedo](https://avatars.githubusercontent.com/u/62542042?v=4)](https://github.com/rollswan-acebedo "rollswan-acebedo (1 commits)")

### Embed Badge

![Health badge](/badges/rollswan-uuid/health.svg)

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

PHPackages © 2026

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