PHPackages                             afaanbilal/laravel-has-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. afaanbilal/laravel-has-uuid

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

afaanbilal/laravel-has-uuid
===========================

Autogenerate UUIDs for your Models on insert and set the route-model-binding key to uuid.

0.1.3(3y ago)11.4k↓80%MITPHP

Since Jun 23Pushed 3y ago1 watchersCompare

[ Source](https://github.com/AfaanBilal/laravel-has-uuid)[ Packagist](https://packagist.org/packages/afaanbilal/laravel-has-uuid)[ RSS](/packages/afaanbilal-laravel-has-uuid/feed)WikiDiscussions master Synced yesterday

READMEChangelogDependencies (1)Versions (5)Used By (0)

Laravel HasUUID
===============

[](#laravel-hasuuid)

Author: **[Afaan Bilal](https://afaan.dev)**

Introduction
------------

[](#introduction)

**Laravel HasUUID** is a package for Laravel to autogenerate UUIDs for your Models on insert and set the route-model-binding key to `uuid`. Also adds a `fromUUID` method to your Model which accepts a `uuid` and returns a model instance if found, or null otherwise.

Please make sure that you have column in your table called `uuid` which is a unique index.

Example (in migration):

```
$table->string('uuid')->unique();
```

Installation
============

[](#installation)

```
composer require afaanbilal/laravel-has-uuid

```

Usage
=====

[](#usage)

```
// In any model:

use AfaanBilal\LaravelHasUUID\HasUUID;
// ...

class Post extends Model
{
    use HasUUID;
    // ...
}
```

Contributing
------------

[](#contributing)

All contributions are welcome. Please create an issue first for any feature request or bug. Then fork the repository, create a branch and make any changes to fix the bug or add the feature and create a pull request. That's it! Thanks!

License
-------

[](#license)

**Laravel HasUUID** is released under the MIT License. Check out the full license [here](LICENSE).

###  Health Score

23

—

LowBetter than 26% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity19

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity37

Early-stage or recently created project

 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 ~1 days

Total

4

Last Release

1103d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/1507671?v=4)[Afaan Bilal](/maintainers/afaanbilal)[@AfaanBilal](https://github.com/AfaanBilal)

---

Top Contributors

[![AfaanBilal](https://avatars.githubusercontent.com/u/1507671?v=4)](https://github.com/AfaanBilal "AfaanBilal (12 commits)")

### Embed Badge

![Health badge](/badges/afaanbilal-laravel-has-uuid/health.svg)

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

###  Alternatives

[bavix/laravel-wallet

It's easy to work with a virtual wallet.

1.3k1.3M19](/packages/bavix-laravel-wallet)[leantime/leantime

Open source project management system for non-project managers. Simple like Trello, powerful like Jira. Built with neurodiversity in mind.

10.2k3.5k](/packages/leantime-leantime)[google/cloud-bigquery

BigQuery Client for PHP

8919.2M53](/packages/google-cloud-bigquery)[patchlevel/event-sourcing

A lightweight but also all-inclusive event sourcing library with a focus on developer experience

207362.9k13](/packages/patchlevel-event-sourcing)[shopware/core

Shopware platform is the core for all Shopware ecommerce products.

585.6M574](/packages/shopware-core)[markocupic/calendar-event-booking-bundle

Contao Calendar Event Booking Bundle

135.2k1](/packages/markocupic-calendar-event-booking-bundle)

PHPackages © 2026

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