PHPackages                             lampge/ulid - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. lampge/ulid

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

lampge/ulid
===========

Laravel package Use to auto product primary key.

v0.2.6(7y ago)0321PHPPHP &gt;=7.1.2

Since May 15Pushed 7y ago1 watchersCompare

[ Source](https://github.com/812913889/laravel-ulid)[ Packagist](https://packagist.org/packages/lampge/ulid)[ RSS](/packages/lampge-ulid/feed)WikiDiscussions master Synced 3d ago

READMEChangelog (1)Dependencies (5)Versions (10)Used By (1)

Laravel ULID
============

[](#laravel-ulid)

Laravel package to generate ULID (Universally Unique Lexicographically Sortable Identifier), which also contains trait for your models that will let you generate ULID ids for your Eloquent models automatically. Based on **robinvdvleuten/php-ulid**.

這個專案根據 **rorecek/laravel-ulid** 進行修改，修改一些路徑參考的錯誤，和 composer update 時會發生的錯誤，然後優化了一些使用

Usage
-----

[](#usage)

### Migrations

[](#migrations)

使用 char 26 進行宣告

```
$table->char('id', 26)
    ->comment('[PK] 資料識別碼');

```

### Models

[](#models)

在要使用的 ORM 檔案中 `use Ariby\Ulid\HasUlid`

```
use Illuminate\Database\Eloquent\Model;
use ariby\Ulid\HasUlid;

class Item extends Model
{
  use HasUlid;

  ....
}
```

即可

### 動態產生

[](#動態產生)

若是需要在程式中動態產生 ulid

需要於命名空間 `use Ariby\Ulid\Ulid;`

即可使用動態方法 `(string)Ulid::generate()` 取得

###  Health Score

25

—

LowBetter than 37% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity54

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~23 days

Recently: every ~32 days

Total

10

Last Release

2710d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/dffa3c31e0aff3aec7cc3222df9f682b7b950b3cb6fb99c02760e5b8bb434e14?d=identicon)[lampge](/maintainers/lampge)

---

Top Contributors

[![defsrisars](https://avatars.githubusercontent.com/u/16033905?v=4)](https://github.com/defsrisars "defsrisars (7 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/lampge-ulid/health.svg)

```
[![Health](https://phpackages.com/badges/lampge-ulid/health.svg)](https://phpackages.com/packages/lampge-ulid)
```

###  Alternatives

[barryvdh/laravel-ide-helper

Laravel IDE Helper, generates correct PHPDocs for all Facade classes, to improve auto-completion.

14.9k123.0M687](/packages/barryvdh-laravel-ide-helper)[orchestra/canvas

Code Generators for Laravel Applications and Packages

21017.2M158](/packages/orchestra-canvas)[illuminate/pipeline

The Illuminate Pipeline package.

9446.6M213](/packages/illuminate-pipeline)[illuminate/pagination

The Illuminate Pagination package.

10532.5M862](/packages/illuminate-pagination)[spatie/laravel-pjax

A pjax middleware for Laravel 5

513371.8k11](/packages/spatie-laravel-pjax)[spatie/laravel-mix-preload

Add preload and prefetch links based your Mix manifest

169176.0k2](/packages/spatie-laravel-mix-preload)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
