PHPackages                             garethnic/unique - 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. garethnic/unique

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

garethnic/unique
================

A Laravel package to make uuid fields in a database table

38PHP

Since Mar 8Pushed 10y ago1 watchersCompare

[ Source](https://github.com/garethnic/unique)[ Packagist](https://packagist.org/packages/garethnic/unique)[ RSS](/packages/garethnic-unique/feed)WikiDiscussions master Synced yesterday

READMEChangelogDependenciesVersions (1)Used By (0)

Unique
======

[](#unique)

This is a Laravel package that lets you add uuid's to a selected field.

Install
-------

[](#install)

Add the following to your `composer.json` file:

```
"garethnic/unique": "dev-master"
```

Add the garethnic\\ServiceProvider to your config/app.php providers array:

```
garethnic\Unique\UniqueServiceProvider::class,
```

Then run the following command to copy config file.

```
$ vendor:publish
```

Usage
-----

[](#usage)

In your model import the trait:

```
namespace App;

use garethnic\Unique\Unique;
```

Then it's as simple as:

```
class User extends Authenticatable
{
    use Unique;

    ...
```

You can specify which field to fill in the `config/unique.php` file:

```
return [
    'field' => 'name'
];
```

Change log
----------

[](#change-log)

Please see [CHANGELOG](CHANGELOG.md) for more information what has changed recently.

Testing
-------

[](#testing)

```
$ composer test
```

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](CONTRIBUTING.md) and [CONDUCT](CONDUCT.md) for details.

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

21

—

LowBetter than 18% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity41

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.

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/1523598?v=4)[Gareth](/maintainers/garethnic)[@garethnic](https://github.com/garethnic)

---

Top Contributors

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

### Embed Badge

![Health badge](/badges/garethnic-unique/health.svg)

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

###  Alternatives

[jdorn/sql-formatter

a PHP SQL highlighting library

3.9k117.2M114](/packages/jdorn-sql-formatter)[propel/propel1

Propel is an open-source Object-Relational Mapping (ORM) for PHP5.

8351.6M87](/packages/propel-propel1)[jfelder/oracledb

Oracle DB driver for Laravel

11518.4k](/packages/jfelder-oracledb)

PHPackages © 2026

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