friendsofhyperf/model-uid-addon

The ULID/UUID addon for Hyperf Model.

v3.0.112 2023-12-20 04:21 UTC

README

model-uid-addon

Latest Stable Version Total Downloads License

The ULID/UUID addon for Hyperf Model.

This feature has been migrated to hyperf/database, if you are using hyperf/database > 3.0.9, You don't need to install this extension.

Installation

  • Request
composer require friendsofhyperf/model-uid-addon
# ulid
composer require symfony/uid
# uuid
composer require ramsey/uuid:^4.7

Usage

<?php

namespace App\Model;

use Hyperf\Database\Model\Concerns\HasUlids;

class Article extends Model
{
    use HasUlids;

    // ...
}

Sponsor

If you like this project, Buy me a cup of coffee. [ Alipay | WePay ]