Using UUIDs with Laravel’s Eloquent ORM
Garrett St. John wrote a clear example on how to use UUIDs in Eloquent models. This kind of logic could go in a trait so it can be reused across multiple models.
By default, Eloquent uses an auto-incrementing integer as the primary key for its tables. While most of the time this is totally acceptable, sometimes there is a need for primary keys to be less predictable.http://garrettstjohn.com/entry/using-uuids-laravel-eloquent-orm/
EDIT: Kirk Bushell has made a trait for this functionality. Take a look at his Eloquence package on GitHub.
What are your thoughts on "Using UUIDs with Laravel’s Eloquent ORM"?