PHPackages                             rubiconinternational/uuid - 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. rubiconinternational/uuid

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

rubiconinternational/uuid
=========================

Laravel package to generate a UUID according to the RFC 4122 standard. UUID Versions 1, 3, 4 and 5 are supported. With MIT license.

1.0.1(7y ago)026MITPHPPHP &gt;=5.3.0

Since Aug 2Pushed 7y ago6 watchersCompare

[ Source](https://github.com/RubiconInternational/Uuid)[ Packagist](https://packagist.org/packages/rubiconinternational/uuid)[ Docs](https://github.com/rubiconinternational/uuid)[ RSS](/packages/rubiconinternational-uuid/feed)WikiDiscussions master Synced 2d ago

READMEChangelog (2)Dependencies (2)Versions (2)Used By (0)

Laravel Uuid (Universally unique identifier)
============================================

[](#laravel-uuid-universally-unique-identifier)

Laravel package to generate a UUID according to the RFC 4122 standard. UUID Versions 1, 3, 4 and 5 are supported. With MIT license.

- [About](#about)
- [Requirements](#requirements)
- [Installation](#installation)
- [Basic Usage](#basic-usage)
- [Advanced Usage](#advanced-usage)
    - [UUID creation](#uuid-creation)
        - [UUID V1](#uuid-v1)
        - [UUID V3](#uuid-v3)
        - [UUID V4](#uuid-v4)
        - [UUID V5](#uuid-v5)
- [Additional Features](#additional-features)
    - [Import UUID](#import-uuid)
    - [Extract time](#extract-time)
    - [Extract Version](#extract-version)
- [Changelog](#changelog)
    - [2.\*](#2.*)
- [License](#license)
- [Credits](#credits)

### About

[](#about)

Since Laravel `4.*` and `5.*` both rely on either `OpenSSL` or `Mcrypt`, the pseudo random byte generator now tries to use one of them. If both cannot be used (not a Laravel project?), the 'less random' `mt_rand()` function is used.

### Requirements

[](#requirements)

- [Laravel 5.3, 5.4 or newer](https://laravel.com/docs/installation)

### Installation

[](#installation)

1. From your projects root folder in terminal run:

```
    composer require rubiconinternational/uuid
```

2. Register the package with laravel in `config/app.php` under `aliases` with the following:

```
    'aliases' => [
        'Uuid' => rubiconinternational\Uuid\Uuid::class,
    ];
```

### Basic Usage

[](#basic-usage)

To quickly generate a UUID just do

```
    Uuid::generate()
```

- This will generate a version 1 with a random ganerated MAC address.

### Advanced Usage

[](#advanced-usage)

#### UUID creation

[](#uuid-creation)

##### UUID V1

[](#uuid-v1)

Generate a version 1, time-based, UUID. You can set the optional node to the MAC address. If not supplied it will generate a random MAC address.

```
Uuid::generate(1,'00:11:22:33:44:55');
```

##### UUID V3

[](#uuid-v3)

Generate a version 3, name-based using MD5 hashing, UUID

```
Uuid::generate(3,'test', Uuid::NS_DNS);
```

##### UUID V4

[](#uuid-v4)

Generate a version 4, truly random, UUID

```
Uuid::generate(4);
```

##### UUID V5

[](#uuid-v5)

Generate a version 5, name-based using SHA-1 hashing, UUID

```
Uuid::generate(5,'test', Uuid::NS_DNS);
```

### Additional Features

[](#additional-features)

###### Import UUID

[](#import-uuid)

- To import a UUID

```
$uuid = Uuid::import('d3d29d70-1d25-11e3-8591-034165a3a613');
```

###### Extract Time

[](#extract-time)

- Extract the time for a time-based UUID (version 1)

```
$uuid = Uuid::generate(1);
dd($uuid->time);
```

###### Extract Version

[](#extract-version)

- Extract the version of an UUID

```
$uuid = Uuid::generate(4);
dd($uuid->version);
```

### Changelog

[](#changelog)

##### 2.\*

[](#2)

- Laravel Uuid is now fully PSR-2, just like Laravel 5.1.
- Not that much has changed except for UPPERCASING the constants used in Laravel Uuid.
- Meaning `Uuid::nsDNS` is now `Uuid::NS_DNS` etc. Should be an easy fix.

### Credits

[](#credits)

- Full development credit must go to [webpatser](https://github.com/webpatser). This package was forked and modified to be compliant with [MIT](https://opensource.org/licenses/MIT) licencing standards for production use.

License
-------

[](#license)

Laravel UUID is licensed under the MIT license for both personal and commercial products. Enjoy!

###  Health Score

25

—

LowBetter than 37% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity57

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

2841d ago

### Community

Maintainers

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

---

Top Contributors

[![aelliott1485](https://avatars.githubusercontent.com/u/7459390?v=4)](https://github.com/aelliott1485 "aelliott1485 (3 commits)")

---

Tags

UUID RFC4122

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/rubiconinternational-uuid/health.svg)

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

###  Alternatives

[baibaratsky/php-wmsigner

WebMoney Signer: a native PHP implementation of the WMSigner module

16399.8k3](/packages/baibaratsky-php-wmsigner)[wujunze/laravel-id-generate

Laravel package to generate and to validate a UUID according to the RFC 4122 standard. Only support for version 1, 3, 4 and 5 UUID are built-in. and generate number id, generate primary key

134.4k](/packages/wujunze-laravel-id-generate)[aak74/bx-data

Классы для удобного доступа к данным в 1C-Bitrix

232.1k](/packages/aak74-bx-data)

PHPackages © 2026

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