shoperti / cuid
Collision-resistant ids optimized for horizontal scaling and performance.
Installs: 3 616
Dependents: 0
Suggesters: 0
Security: 0
Stars: 4
Watchers: 4
Forks: 0
Open Issues: 0
Requires
- php: >=5.4.0
Requires (Dev)
- phpunit/phpunit: ~4.0
This package is auto-updated.
Last update: 2024-10-09 14:14:31 UTC
README
This is a port from https://github.com/ericelliott/cuid to PHP. Please refer to the original repo for more information.
Installation
Begin by installing this package through Composer. Edit your project's composer.json
file to require shoperti/cuid
.
"require": { "shoperti/cuid": "~1.0" }
Next, update Composer from the Terminal:
composer update
Examples
// Create a new cuid $cuid = new Shoperti\Cuid\Cuid::cuid(); // Create a new cuid slug $cuid = new Shoperti\Cuid\Cuid::slug();