jasonmccallister / laravel-uuid-as-id
Simple Laravel package that includes a trait for using UUIDs and IDs on Eloquent models
Installs: 24
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
pkg:composer/jasonmccallister/laravel-uuid-as-id
Requires
- php: ^7.1
Requires (Dev)
- phpunit/phpunit: ^7.0
This package is auto-updated.
Last update: 2025-09-14 15:54:51 UTC
README
This is a simple trait that will override the key on an eloquent model to create a UUID instead of an integer.
Installation
You can install the package via composer:
composer require jasonmccallister/laravel-uuid-as-id
Usage
Update your models to use the trait, and you are done!
<?php namespace App; use Illuminate\Database\Eloquent\Model; use JasonMcCallister\UuidAsId\Traits\UuidAsId; class SomeModel extends Model { use UuidAsId; // the rest of your model's code }
Testing
composer test
Credits
License
The MIT License (MIT). Please see License File for more information.