jberall/yii2-uuidbehavior

Attaches a Ramsey V4::UUID

Installs: 8

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 2

Forks: 0

Open Issues: 0

Type:yii2-extension

dev-master 2017-04-26 22:39 UTC

This package is not auto-updated.

Last update: 2024-05-03 21:38:50 UTC


README

Attaches a Ramsey V4::UUID

Installation

The preferred way to install this extension is through composer.

Either run

php composer.phar require --prefer-dist jberall/yii2-uuidbehavior "*"

or add

"jberall/yii2-uuidbehavior": "*"

to the require section of your composer.json file.

Usage

Once the extension is installed, simply use it in your code by : Where _id is the column in the database representing a UUID. public function behaviors() { return [ 'uuidBehavior' => [ 'class' => \jberall\uuidbehavior\UuidBehavior::className(), 'uuid_column' => '_id', ], ]; }