PHPackages                             labrodev/laravel-uuidable - 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. labrodev/laravel-uuidable

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

labrodev/laravel-uuidable
=========================

Laravel package providing a reusable trait that automatically assigns a UUID to Eloquent models upon creation.

v1.0.1(1y ago)178MITPHPPHP &gt;=8.1

Since Jun 23Pushed 1y ago1 watchersCompare

[ Source](https://github.com/labrodev/laravel-uuidable)[ Packagist](https://packagist.org/packages/labrodev/laravel-uuidable)[ Docs](https://github.com/labrodev/laravel-uuidable)[ RSS](/packages/labrodev-laravel-uuidable/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependencies (13)Versions (3)Used By (0)

Uuidable for Laravel
====================

[](#uuidable-for-laravel)

Uuidable is a Laravel package that provides a reusable trait for automatically assigning a UUID to Eloquent models upon their creation. This package utilizes the Ramsey UUID library to ensure UUIDs are generated in a standard and reliable manner.

Installation
------------

[](#installation)

To install the package, run the following command in your Laravel project:

```
composer require labrodev/uuidable
```

Requirements
------------

[](#requirements)

- PHP 8.1 or higher

Configuration
-------------

[](#configuration)

After installing the package, no additional configuration is needed to start using the UUID trait in your models.

Usage
-----

[](#usage)

To use the `ModelHasUuid` trait, simply include it in your Eloquent model:

```
