PHPackages                             lucadello91/eloquent-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. lucadello91/eloquent-uuid

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

lucadello91/eloquent-uuid
=========================

Laravel Eloquent Model trait for using UUID on primary key

1.5.0(2y ago)08.9kMITPHPPHP ^8.0CI failing

Since Nov 18Pushed 2y ago1 watchersCompare

[ Source](https://github.com/lucadello91/eloquent-uuid)[ Packagist](https://packagist.org/packages/lucadello91/eloquent-uuid)[ Docs](https://github.com/lucadello91/eloquent-uuid)[ RSS](/packages/lucadello91-eloquent-uuid/feed)WikiDiscussions master Synced 3w ago

READMEChangelog (7)Dependencies (7)Versions (15)Used By (0)

[![](https://camo.githubusercontent.com/a59786388f2992db1d4be3394cb0e7e5d5b90453858e480571486dbef5f8a7c8/68747470733a2f2f62616e6e6572732e6265796f6e64636f2e64652f456c6f7175656e74253230555549442e706e673f7468656d653d6c69676874267061636b6167654e616d653d6c75636164656c6c6f3931253246656c6f7175656e742d75756964267061747465726e3d66616c6c696e67547269616e676c6573267374796c653d7374796c655f31266465736372697074696f6e3d456173792b656c6f7175656e742b555549442b7472616974266d643d3126666f6e7453697a653d313030707826696d616765733d6b6579)](https://camo.githubusercontent.com/a59786388f2992db1d4be3394cb0e7e5d5b90453858e480571486dbef5f8a7c8/68747470733a2f2f62616e6e6572732e6265796f6e64636f2e64652f456c6f7175656e74253230555549442e706e673f7468656d653d6c69676874267061636b6167654e616d653d6c75636164656c6c6f3931253246656c6f7175656e742d75756964267061747465726e3d66616c6c696e67547269616e676c6573267374796c653d7374796c655f31266465736372697074696f6e3d456173792b656c6f7175656e742b555549442b7472616974266d643d3126666f6e7453697a653d313030707826696d616765733d6b6579)

Eloquent UUID
=============

[](#eloquent-uuid)

An Eloquent UUID Trait to use with Laravel &gt; 5.6

[![Latest Version on Packagist](https://camo.githubusercontent.com/34d1b44a0896fe7d881d53cbcb9632d290873f21a0fca4f8b6f86db28419311a/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6c75636164656c6c6f39312f656c6f7175656e742d757569642e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/lucadello91/eloquent-uuid)[![Tests](https://github.com/lucadello91/eloquent-uuid/actions/workflows/run-tests.yml/badge.svg?branch=master)](https://github.com/lucadello91/eloquent-uuid/actions/workflows/run-tests.yml)[![Check & fix styling](https://github.com/lucadello91/eloquent-uuid/actions/workflows/php-cs-fixer.yml/badge.svg)](https://github.com/lucadello91/eloquent-uuid/actions/workflows/php-cs-fixer.yml)[![CodeFactor](https://camo.githubusercontent.com/87708ee62d7463a4dba3ca78c9d9cb5e2985076c594f6bf49f64b9cba660e3be/68747470733a2f2f7777772e636f6465666163746f722e696f2f7265706f7369746f72792f6769746875622f6c75636164656c6c6f39312f656c6f7175656e742d757569642f62616467653f7374796c653d666c61742d737175617265)](https://www.codefactor.io/repository/github/lucadello91/eloquent-uuid)[![StyleCI](https://camo.githubusercontent.com/e4bd61dce9c5f349ee3d4ba4999b95cce8becec8384ebcb19c0e01a90dec6e5d/68747470733a2f2f6769746875622e7374796c6563692e696f2f7265706f732f3232323437303934362f736869656c643f6272616e63683d6d6173746572)](https://github.styleci.io/repos/222470946)[![MIT licensed](https://camo.githubusercontent.com/de6c4b097d5fa4038fb3c7c61fbb06b0011a287d6fdf18bca0614731602439d1/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f6c75636164656c6c6f39312f656c6f7175656e742d757569643f7374796c653d666c61742d737175617265)](https://img.shields.io/github/license/lucadello91/eloquent-uuid)[![Total Downloads](https://camo.githubusercontent.com/837cbf0afa83f92e793366895b6d240e07e736516222251f43a3e27a79763fdd/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6c75636164656c6c6f39312f656c6f7175656e742d757569642e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/lucadello91/eloquent-uuid)

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

[](#installation)

```
composer require lucadello91/eloquent-uuid

```

#### In your models

[](#in-your-models)

For using uuid in your Eloquent Model, just put `use UuidModelTrait;`:

```
