PHPackages                             larastuffs/primary-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. larastuffs/primary-uuid

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

larastuffs/primary-uuid
=======================

Use UUID as primary key on Laravel Models

v0.3(4y ago)272MITPHPPHP ^7.3|8.\*

Since Jun 10Pushed 4y ago1 watchersCompare

[ Source](https://github.com/LaraStuffs/PrimaryUUID)[ Packagist](https://packagist.org/packages/larastuffs/primary-uuid)[ RSS](/packages/larastuffs-primary-uuid/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (3)Dependencies (5)Versions (4)Used By (0)

LaraStuffs Primary UUID
=======================

[](#larastuffs-primary-uuid)

[![Packagist Version](https://camo.githubusercontent.com/c9b41528c5b4fb47757c515ce480240681b15d9b4575809f89f484cb65d771b0/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6c6172617374756666732f7072696d6172792d75756964)](https://packagist.org/packages/larastuffs/primary-uuid)[![License](https://camo.githubusercontent.com/074b89bca64d3edc93a1db6c7e3b1636b874540ba91d66367c0e5e354c56d0ea/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e737667)](https://github.com/LaraStuffs/PrimaryUUID/blob/master/LICENSE.md)

#### this package provides a simple interface for using UUID as a primary key in models

[](#this-package-provides-a-simple-interface-for-using-uuid-as-a-primary-key-in-models)

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

[](#requirements)

- PHP 7.2 or latest
- Laravel 6.\* | 7.\* | 8.\*

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

[](#installation)

Require this package with composer using the following command:

```
composer require larastuffs/primary-uuid
```

Usage
-----

[](#usage)

Follow the instructions to adapt your models and migrations

### Model Setup

[](#model-setup)

```
