ollico/laravel-uid
A handy package to generate unique identifiers for Eloquent models
12,602
| Install | |
|---|---|
composer require ollico/laravel-uid |
|
| Latest Version: | v6.0.0 |
| PHP: | ^8.2 |
| License: | MIT |
| Last Updated: | Jan 28, 2026 |
| Links: | GitHub · Packagist |
Maintainer: davidianbonner
UID Helper
A handy little Laravel compatible package that creates unique identifiers like u5CVsCnxyXg for your Eloquent models.
Installation
Require this package
composer require ollico/uid
Usage
Configuration
Database
Add the $table->uid() in your Schemas:
Schema::create('your_table', function (Blueprint $table) {
$table->uid();
})
Eloquent
Add the HasUid trait to your Models to add the capabilities:
- Local scope
$model->uid($uid) - Automatic generation of
uidduring thecreatingevent
Good to know
We utilise HashIds under the hood.
Related Packages
doctrine/dbal
Powerful PHP database abstraction layer (DBAL) with many features for database s...
631,580,251
9,707
laravel/serializable-closure
Laravel Serializable Closure provides an easy and secure way to serialize closur...
404,034,618
608
nunomaduro/collision
Cli error handling for console/command-line PHP applications.
384,821,166
4,658