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

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

risetechapps/has-uuid-for-laravel
=================================

Has Uuid Laravel

1.1.0(3mo ago)0361—0%5MITPHPPHP ^8.3

Since Nov 27Pushed 3mo ago1 watchersCompare

[ Source](https://github.com/risetechapps/has-uuid-for-laravel)[ Packagist](https://packagist.org/packages/risetechapps/has-uuid-for-laravel)[ Docs](https://github.com/risetechapps/has-uuid-for-laravel)[ RSS](/packages/risetechapps-has-uuid-for-laravel/feed)WikiDiscussions main Synced today

READMEChangelogDependencies (3)Versions (4)Used By (5)

Laravel Has UUID for Laravel
============================

[](#laravel-has-uuid-for-laravel)

📌 Sobre o projeto
-----------------

[](#-sobre-o-projeto)

O **Laravel Has UUID** é um pacote enxuto que adiciona uma única trait para gerar automaticamente chaves primárias do tipo UUID em modelos Eloquent. Ele é ideal para projetos que desejam substituir IDs auto incrementais por identificadores universais sem repetir código.

✨ Funcionalidades
-----------------

[](#-funcionalidades)

- 🔄 **Geração automática de UUID**: atribui um UUID v4 ou v7 sempre que um modelo é criado e ainda não possui um valor definido para a chave primária.
- 🔐 **Configuração adequada do modelo**: força o uso de chaves não incrementais e do tipo `string`, requisitos essenciais para trabalhar com UUIDs no Eloquent.

---

🚀 Instalação
------------

[](#-instalação)

### 1️⃣ Requisitos

[](#1️⃣-requisitos)

Certifique-se de que seu projeto atende aos seguintes requisitos:

- PHP &gt;= 8.3
- Laravel 12.x
- Composer instalado

### 2️⃣ Instalação do pacote

[](#2️⃣-instalação-do-pacote)

Execute o comando abaixo no terminal:

```
  composer require risetechapps/has-uuid-for-laravel
```

### 3️⃣ Configure seu model

[](#3️⃣-configure-seu-model)

Adicione a trait `HasUuid` ao seu modelo Eloquent:

```
use Illuminate\Database\Eloquent\Model;
use RiseTechApps\HasUuid\Traits\HasUuid;

class Client extends Model
{
    use HasUuid;
}
```

A trait irá preencher automaticamente a chave primária com um UUID caso você não defina um valor manualmente.

---

🛠 Contribuição
--------------

[](#-contribuição)

Sinta-se à vontade para contribuir! Basta seguir estes passos:

1. Faça um fork do repositório
2. Crie uma branch (`feature/minha-melhoria`)
3. Faça um commit das suas alterações
4. Envie um Pull Request

---

📜 Licença
---------

[](#-licença)

Este projeto é distribuído sob a licença MIT. Veja o arquivo [LICENSE](LICENSE.md) para mais detalhes.

---

💡 **Desenvolvido por [Rise Tech](https://risetech.com.br)**

###  Health Score

44

—

FairBetter than 92% of packages

Maintenance82

Actively maintained with recent releases

Popularity16

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity55

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

Total

2

Last Release

96d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/ae96932429c94085ffc00280225c32499cfdcadeae88237c27e095cfc67a5485?d=identicon)[risetechapps](/maintainers/risetechapps)

---

Top Contributors

[![risetechapps](https://avatars.githubusercontent.com/u/160299136?v=4)](https://github.com/risetechapps "risetechapps (23 commits)")

---

Tags

laraveluuidrisetech

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

###  Alternatives

[webpatser/laravel-uuid

Laravel integration for webpatser/uuid - High-performance drop-in UUID replacements (15% faster than Ramsey). Provides Str macros, HasUuids trait, facades, and casts. RFC 4122/9562 compliant.

1.8k17.1M120](/packages/webpatser-laravel-uuid)[emadadly/laravel-uuid

laravel uuid a simple, automatic UUID generator for any model based on Laravel.

120414.6k3](/packages/emadadly-laravel-uuid)[madewithlove/laravel-nova-uuid-support

Adds uuid and other string identifier support to Laravel Nova

28132.5k](/packages/madewithlove-laravel-nova-uuid-support)

PHPackages © 2026

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