package-of-yii/uuid-yii

Ramsey Uuid for Yii 2 applications.

v1.1 2021-07-07 04:57 UTC

This package is auto-updated.

Last update: 2024-05-07 11:09:33 UTC


README

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.

Features

  • Automatic insertion of Uuid using Behavior option.

Installation

Use composer to install the package

composer require package-of-yii/uuid-yii

Getting started

Behaviour Class Implementation

use Poyii\Uuid\Behavior\UuidBehavior;

public function behaviors()
{
    return [
        'uuid' => [
            'class' => UuidBehavior::class,
            'column' => 'uuid',
            'value' => Uuid::uuid6(),
        ],
    ];
}

Contributing

All contributors are welcome! For information on how to build, test, and release, see our contributing guide.

License

The Uuid Yii library is free software released under the MIT License.