Download the PHP package astrotomic/laravel-eloquent-uuid without Composer
On this page you can find all versions of the php package astrotomic/laravel-eloquent-uuid. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download astrotomic/laravel-eloquent-uuid
More information about astrotomic/laravel-eloquent-uuid
Files in astrotomic/laravel-eloquent-uuid
Package laravel-eloquent-uuid
Short Description A simple drop-in solution for UUID support in your Eloquent models.
License MIT
Homepage https://astrotomic.info
Informations about the package laravel-eloquent-uuid
Laravel Eloquent UUID
A simple drop-in solution for UUID support in your Eloquent models.
Installation
You can install the package via composer:
Usage
You can use the provided UsesUUID
trait to add an UUID attribute in addition to your normal primary key or use it as the primary key.
Model
This will add an uuid
attribute and auto-fill it before the model is created.
If you want to customize the attribute name you can define a $uuidName
property or override the getUuidName()
method.
And for sure you can use this trait to define your model primary key.
Migration
Laravel provides an uuid()
column type on the table Blueprint
class.
Testing
Changelog
Please see CHANGELOG for more information what has changed recently.
Contributing
Please see CONTRIBUTING for details. You could also be interested in CODE OF CONDUCT.
Security
If you discover any security related issues, please check SECURITY for steps to report it.
Credits
- Tom Witkowski
- All Contributors
Alternatives
License
The MIT License (MIT). Please see License File for more information.
Treeware
You're free to use this package, but if it makes it to your production environment I would highly appreciate you buying the world a tree.
It’s now common knowledge that one of the best tools to tackle the climate crisis and keep our temperatures from rising above 1.5C is to plant trees. If you contribute to my forest you’ll be creating employment for local families and restoring wildlife habitats.
You can buy trees at offset.earth/treeware
Read more about Treeware at treeware.earth
All versions of laravel-eloquent-uuid with dependencies
illuminate/database Version ^8.0 || ^9.0
ramsey/uuid Version ^3.7 || ^4.0