PHPackages                             tankfairies/laravel-guid - 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. tankfairies/laravel-guid

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

tankfairies/laravel-guid
========================

Laravel GUID Generator

2.0.5(2y ago)01.4k[1 PRs](https://github.com/tankfairies/laravel-guid/pulls)MITPHPPHP ^8.2

Since Jul 18Pushed 1y agoCompare

[ Source](https://github.com/tankfairies/laravel-guid)[ Packagist](https://packagist.org/packages/tankfairies/laravel-guid)[ Docs](https://tankfairies.com/)[ RSS](/packages/tankfairies-laravel-guid/feed)WikiDiscussions 2.0 Synced yesterday

READMEChangelog (8)Dependencies (4)Versions (12)Used By (0)

[![Latest Stable Version](https://camo.githubusercontent.com/77ff4f2627148bd13e484c578630a3b79d1e5a18d98e4fc5eb44c0f43fcb0f7d/68747470733a2f2f706f7365722e707567782e6f72672f74616e6b666169726965732f6c61726176656c2d677569642f762f737461626c65)](https://packagist.org/packages/tankfairies/laravel-guid)[![Total Downloads](https://camo.githubusercontent.com/b1c192290e4ee0d28d057c222825e7cab83cbf51a01adce365d6e8fddc2837c5/68747470733a2f2f706f7365722e707567782e6f72672f74616e6b666169726965732f6c61726176656c2d677569642f646f776e6c6f616473)](https://packagist.org/packages/tankfairies/laravel-guid)[![Latest Unstable Version](https://camo.githubusercontent.com/0e0d0b995bfbf52312fc1158c4be4586e82bc517d8c4137b89b0b9e997da0dbe/68747470733a2f2f706f7365722e707567782e6f72672f74616e6b666169726965732f6c61726176656c2d677569642f762f756e737461626c65)](https://packagist.org/packages/tankfairies/laravel-guid)[![License](https://camo.githubusercontent.com/a75e7bbb8708530419657aea5b7e782e4cb8f480d383a09944869dd83718426b/68747470733a2f2f706f7365722e707567782e6f72672f74616e6b666169726965732f6c61726176656c2d677569642f6c6963656e7365)](https://packagist.org/packages/tankfairies/laravel-guid)[![Build Status](https://camo.githubusercontent.com/e9e62c1f80d921b6c5d9556211770b037f3f569696525f4ff8465e4f35b4588b/68747470733a2f2f7472617669732d63692e636f6d2f74616e6b666169726965732f6c61726176656c2d677569642e7376673f6272616e63683d322e30)](https://travis-ci.com/github/tankfairies/laravel-guid)

Laravel GUID
============

[](#laravel-guid)

This Laravel package is useful for creating globally unique identifiers (GUID).

Installation
------------

[](#installation)

Install with [Composer](https://getcomposer.org/):

```
composer require tankfairies/laravel-guid
```

Usage
-----

[](#usage)

There are four GUID types available. GUID Version: -

```
    GuidInterface::UUID_TIME      -> Time based UUID        (version 1)
    GuidInterface::UUID_NAME_MD5  -> Name based (MD5) UUID  (version 3)
    GuidInterface::UUID_RANDOM    -> Random UUID            (version 4)
    GuidInterface::UUID_NAME_SHA1 -> Name based (SHA1) UUID (version 5)

```

All the GUIDs can be generated in one of three formats String, binary and byte. GUID format: -

```
    GuidInterface::FMT_STRING
    GuidInterface::FMT_BINARY
    GuidInterface::FMT_BYTE

```

#### Laravel

[](#laravel)

Register the package service provider in `config/app.php` file.

```
'providers' => [
    Tankfairies\LaravelGuid\GuidServiceProvider::class,
]
```

Create GUID
-----------

[](#create-guid)

This will generate a random GUID

```
echo "GUID: " . guid(); // example output: 2b23924f-0eaa-4133-848e-7ce1edeca8c9
```

The guid function has four parameters: -

```
guid(version, format, salt, namespace)
```

The salt needs to be at least 6 characters long and is only required for a `UUID_TIME`. It can also be optionally used for `UUID_NAME_MD5` and `UUID_NAME_SHA1`.

`UUID_NAME_MD5` and `UUID_NAME_SHA1` require the *namespace* parameter to be filled.

Copyright and license
---------------------

[](#copyright-and-license)

The tankfairies/laravel-guid library is Copyright (c) 2019 Tankfairies () and licensed for use under the MIT License (MIT).

###  Health Score

38

—

LowBetter than 85% of packages

Maintenance31

Infrequent updates — may be unmaintained

Popularity18

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity78

Established project with proven stability

 Bus Factor1

Top contributor holds 82.8% 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 ~186 days

Recently: every ~1 days

Total

10

Last Release

814d ago

Major Versions

v1.2 → 2.02024-02-14

PHP version history (2 changes)v1.0.0PHP ^7.2

2.0PHP ^8.2

### Community

Maintainers

![](https://www.gravatar.com/avatar/761e80f0c4632541e235d7d45128d65ace90c65e3c799c11c36a120155eaad58?d=identicon)[tankfairies](/maintainers/tankfairies)

---

Top Contributors

[![tankfairies](https://avatars.githubusercontent.com/u/50480804?v=4)](https://github.com/tankfairies "tankfairies (24 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (5 commits)")

---

Tags

guid

###  Code Quality

TestsCodeception

### Embed Badge

![Health badge](/badges/tankfairies-laravel-guid/health.svg)

```
[![Health](https://phpackages.com/badges/tankfairies-laravel-guid/health.svg)](https://phpackages.com/packages/tankfairies-laravel-guid)
```

###  Alternatives

[ramsey/uuid

A PHP library for generating and working with universally unique identifiers (UUIDs).

12.6k700.2M3.3k](/packages/ramsey-uuid)[pascaldevink/shortuuid

PHP 7.4+ library that generates concise, unambiguous, URL-safe UUIDs

5951.8M15](/packages/pascaldevink-shortuuid)[emadadly/laravel-uuid

laravel uuid a simple, automatic UUID generator for any model based on Laravel.

120415.9k3](/packages/emadadly-laravel-uuid)[keiko/uuid-shortener

A simple shortener library for RFC 4122 compatible UUIDs. Change your 36 chars long UUID into it's shorter equivalent.

150215.4k2](/packages/keiko-uuid-shortener)[oittaa/uuid

A small PHP class for generating RFC 9562 universally unique identifiers (UUID) from version 3 to version 8.

50302.7k5](/packages/oittaa-uuid)[thamtech/yii2-uuid

Yii 2 UUID Helper

35347.9k7](/packages/thamtech-yii2-uuid)

PHPackages © 2026

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