garethnic/unique

A Laravel package to make uuid fields in a database table
8 3
Install
composer require garethnic/unique
PHP:~5.5|~7.0
License:MIT
Last Updated:Mar 8, 2016
Links: GitHub  ·  Packagist
Maintainer: garethnic

Unique

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

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

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

Please see CHANGELOG for more information what has changed recently.

Testing

$ composer test

Contributing

Please see CONTRIBUTING and CONDUCT for details.

License

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

Related Packages

lukaskorl/uniquely

Uniquely identified models for Laravel 4 by using UUID as primary key

2,008 1
theprivateer/eloquent-uuid

UUID utility traits for Laravel

7,181 1
webpatser/laravel-uuid

Laravel integration for webpatser/uuid - High-performance drop-in UUID replaceme...

18,352,936 1,799
emadadly/laravel-uuid

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

423,654 117
dyrynda/laravel-model-uuid

This package allows you to easily work with UUIDs in your Laravel models.

3,284,319 484