PHPackages                             kduma/eloquent-ulidable - 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. [Database &amp; ORM](/categories/database)
4. /
5. kduma/eloquent-ulidable

ActiveLibrary[Database &amp; ORM](/categories/database)

kduma/eloquent-ulidable
=======================

Eases using and generating ulid's in Laravel Eloquent models.

v1.0.0(2y ago)041MITPHPPHP &gt;=8.1

Since Jul 26Pushed 8mo agoCompare

[ Source](https://github.com/kduma-OSS/LV-eloquent-ulidable)[ Packagist](https://packagist.org/packages/kduma/eloquent-ulidable)[ RSS](/packages/kduma-eloquent-ulidable/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (1)DependenciesVersions (2)Used By (0)

L5-eloquent-ulidable
====================

[](#l5-eloquent-ulidable)

[![Latest Stable Version](https://camo.githubusercontent.com/d5972c5d7c9608c59fd40e7183203a966a1aca65635de5171145bedd15abe205/68747470733a2f2f706f7365722e707567782e6f72672f6b64756d612f656c6f7175656e742d756c696461626c652f762f737461626c652e737667)](https://packagist.org/packages/kduma/eloquent-ulidable)[![Total Downloads](https://camo.githubusercontent.com/78c06e985e1e153cb111446b08a7f52aac2a649ae7d0c3f5741f6de5f79c25cf/68747470733a2f2f706f7365722e707567782e6f72672f6b64756d612f656c6f7175656e742d756c696461626c652f646f776e6c6f6164732e737667)](https://packagist.org/packages/kduma/eloquent-ulidable)[![Latest Unstable Version](https://camo.githubusercontent.com/b8e33cb4dda03711392ab6322c4ecb6ba0e15659c7dc763e6501fbf49979f1b4/68747470733a2f2f706f7365722e707567782e6f72672f6b64756d612f656c6f7175656e742d756c696461626c652f762f756e737461626c652e737667)](https://packagist.org/packages/kduma/eloquent-ulidable)[![License](https://camo.githubusercontent.com/a56235e4ac3e887c53a927c590763d1893e83d8adae5e2c7ff159b33ef815f02/68747470733a2f2f706f7365722e707567782e6f72672f6b64756d612f656c6f7175656e742d756c696461626c652f6c6963656e73652e737667)](https://packagist.org/packages/kduma/eloquent-ulidable)

Eases using and generating ulid's in Laravel Eloquent models.

Check full documentation here: [opensource.duma.sh/libraries/php/eloquent-ulidable](https://opensource.duma.sh/libraries/php/eloquent-ulidable)

Setup
=====

[](#setup)

Install it using composer

```
composer require kduma/eloquent-ulidable

```

Prepare models
==============

[](#prepare-models)

Inside your model (not on top of file) add following lines:

```
use \KDuma\Eloquent\Ulidable;

```

In database create `ulid` string field. If you use migrations, you can use following snippet:

```
$table->ulid()->unique();

```

Usage
=====

[](#usage)

By default, it generates slug on first save.

- `$model->regenerateUlid()` - Generate new ulid. (Remember to save it by yourself)
- `Model::whereUlid($ulid)->first()` - Find by ulid. (`whereUlid` is query scope)

Packagist
=========

[](#packagist)

View this package on Packagist.org: [kduma/eloquent-ulidable](https://packagist.org/packages/kduma/eloquent-ulidable)

###  Health Score

29

—

LowBetter than 60% of packages

Maintenance43

Moderate activity, may be stable

Popularity4

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity52

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

Unknown

Total

1

Last Release

1019d ago

### Community

Maintainers

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

---

Top Contributors

[![kduma](https://avatars.githubusercontent.com/u/1062582?v=4)](https://github.com/kduma "kduma (25 commits)")

---

Tags

laravelphplaraveleloquentulid

### Embed Badge

![Health badge](/badges/kduma-eloquent-ulidable/health.svg)

```
[![Health](https://phpackages.com/badges/kduma-eloquent-ulidable/health.svg)](https://phpackages.com/packages/kduma-eloquent-ulidable)
```

###  Alternatives

[rtconner/laravel-likeable

Trait for Laravel Eloquent models to allow easy implementation of a 'like' or 'favorite' or 'remember' feature.

394388.0k5](/packages/rtconner-laravel-likeable)[shiftonelabs/laravel-cascade-deletes

Adds application level cascading deletes to Eloquent Models.

163632.1k2](/packages/shiftonelabs-laravel-cascade-deletes)[highsolutions/eloquent-sequence

A Laravel package for easy creation and management sequence support for Eloquent models with elastic configuration.

121130.3k](/packages/highsolutions-eloquent-sequence)[cybercog/laravel-nova-ban

A Laravel Nova banning functionality for your application.

40199.8k](/packages/cybercog-laravel-nova-ban)[phaza/single-table-inheritance

Single Table Inheritance Trait

1515.8k](/packages/phaza-single-table-inheritance)

PHPackages © 2026

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