andach / laravel-primary-key-uuid
This is an incredibly simple package to add a simple trait for Laravel models where the primary key is a UUID.
Package info
github.com/andach-limited/laravel-primary-key-uuid
pkg:composer/andach/laravel-primary-key-uuid
v1.0.3
2026-07-02 13:53 UTC
Requires
- php: ^8.1
- spatie/laravel-package-tools: ^1.14.0
Requires (Dev)
- laravel/pint: ^1.0
- nunomaduro/collision: ^7.8|^8.0|^9.0
- orchestra/testbench: ^8.8|^9.0|^10.0
- phpunit/phpunit: ^10.0|^11.0
README
This is an incredibly simple package to add a simple trait for Laravel models where the primary key is a UUID.
Installation
You can install the package via composer:
composer require andach/laravel-primary-key-uuid
There are no migrations, views or config file.
Usage
<?php namespace App\Models; use Andach\LaravelPrimaryKeyUuid\Traits\PrimaryKeyUUID; class MyModel extends Model { use PrimaryKeyUUID; // ... }
Testing
composer test
Credits
License
The MIT License (MIT). Please see License File for more information.