PHPackages                             ryancco/laravel-uuid-models - 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. ryancco/laravel-uuid-models

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

ryancco/laravel-uuid-models
===========================

Trait for working with Eloquent models with UUID route keys

2.0(5y ago)134.8kMITPHPPHP ^7.4|^8

Since Sep 7Pushed 5y ago1 watchersCompare

[ Source](https://github.com/ryancco/laravel-uuid-models)[ Packagist](https://packagist.org/packages/ryancco/laravel-uuid-models)[ RSS](/packages/ryancco-laravel-uuid-models/feed)WikiDiscussions master Synced today

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

[![Latest Version on Packagist](https://camo.githubusercontent.com/73fa32c7255a08b2bad7af6410902db1e0e53753925177353b2cfe85c9a3dbcc/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f7279616e63636f2f6c61726176656c2d757569642d6d6f64656c732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/ryancco/laravel-uuid-models)[![Build Status](https://camo.githubusercontent.com/23065a8229e2f4d89f3fa487d122458f0fb86885c9b675d4982029bab4e020b4/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f7279616e63636f2f6c61726176656c2d757569642d6d6f64656c732f6d61737465722e7376673f7374796c653d666c61742d737175617265)](https://travis-ci.org/ryancco/laravel-uuid-models)

Laravel UUID Models
===================

[](#laravel-uuid-models)

This package provides a simple [trait](http://php.net/manual/en/language.oop5.traits.php) to be used on [Laravel](https://laravel.com) Eloquent Models to provide a drop-in solution for UUID route keys (rather than auto-incrementing ID's).

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

[](#installation)

The only supported automated installation is via [Composer](https://getcomposer.org)

```
composer require ryancco/laravel-uuid-models

```

Usage
=====

[](#usage)

Once the package has been installed, you can add the trait to any Eloquent Models you wish to have UUID route keys.

```
