The Uuid for Yii provides you with instant accessibility to use Uuid in Yii PHP applications. This package uses Ramsey uuid to generate unique uuid string.
- Automatic insertion of Uuid using Behavior option.
Use composer to install the package
composer require package-of-yii/uuid-yii
Behaviour Class Implementation
use Poyii\Uuid\Behavior\UuidBehavior;
public function behaviors()
{
return [
'uuid' => [
'class' => UuidBehavior::class,
'column' => 'uuid',
'value' => Uuid::uuid6(),
],
];
}
All contributors are welcome! For information on how to build, test, and release, see our contributing guide.
The Uuid Yii library is free software released under the MIT License.