New

Just launched: Vueblocks, a brand-new search engine for Vue packages! Explore Vueblocks →

cline/strongly-typed-id

Strongly-typed ID value objects for PHP with support for UUID, ULID, NanoID, GUID, Sqid, Hashids and Laravel integration
11,372
Install
composer require cline/strongly-typed-id
Latest Version:3.0.1
PHP:^8.5.0
Laravel:10 – 13
License:MIT
Last Updated:Mar 19, 2026
Links: GitHub  ·  Packagist
Maintainer: faustbrian

GitHub Workflow Status Latest Version on Packagist Software License Total Downloads


This library provides strongly-typed ID value objects for PHP 8.4+, designed to create type-safe entity identifiers with support for multiple ID generation strategies including UUID variants (v1, v3, v4, v5, v6, v7, v8), ULID, NanoID, GUID, Sqids, Hashids, Prefixed IDs (Stripe-style with configurable generators), Random String, and Random Bytes.

Requirements

Requires PHP 8.4+

Installation

composer require cline/strongly-typed-id

Documentation

Change log

Please see CHANGELOG for more information on what has changed recently.

Contributing

Please see CONTRIBUTING and CODE_OF_CONDUCT for details.

Security

If you discover any security related issues, please use the GitHub security reporting form rather than the issue queue.

Credits

License

The MIT License. Please see License File for more information.

Related Packages

rorecek/laravel-ulid

Laravel package for ULID (Universally Unique Lexicographically Sortable Identifi...

171,125 52
riipandi/laravel-optikey

Use UUID, Ulid, or nanoid as optional or primary key in Laravel.

9,385 42
kduma/eloquent-uuidable

Eloquent Uuidable Trait

1,006 0
gstjohn/eloquent-uuids

Easily allow Laravel Eloquent models to utilize UUIDs as their primary key.

6 0
brokeyourbike/uid-keys

A simple drop-in solution for providing UUID and ULID support for the IDs of you...

1,647 0

Version History

Version Released PHP License
3.0.1 ^8.5.0 MIT
3.0.0 ^8.5.0 MIT
2.0.2 ^8.5.0 MIT
2.0.1 ^8.5.0 MIT
2.0.0 ^8.5.0 MIT