2017 © Pedro Peláez
 

library unique

A Laravel package to make uuid fields in a database table

image

garethnic/unique

A Laravel package to make uuid fields in a database table

  • Tuesday, March 8, 2016
  • by garethnic
  • Repository
  • 1 Watchers
  • 3 Stars
  • 2 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

Unique

This is a Laravel package that lets you add uuid's to a selected field., (*1)

Install

Add the following to your composer.json file:, (*2)

``` bash "garethnic/unique": "dev-master", (*3)


Add the garethnic\ServiceProvider to your config/app.php providers array: ``` php garethnic\Unique\UniqueServiceProvider::class,

Then run the following command to copy config file., (*4)

``` bash $ vendor:publish, (*5)


## Usage In your model import the trait: ``` php namespace App; use garethnic\Unique\Unique;

Then it's as simple as:, (*6)

``` php class User extends Authenticatable { use Unique;, (*7)

...

You can specify which field to fill in the `config/unique.php` file: ``` php return [ 'field' => 'name' ];

Change log

Please see CHANGELOG for more information what has changed recently., (*8)

Testing

bash $ composer test, (*9)

Contributing

Please see CONTRIBUTING and CONDUCT for details., (*10)

License

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

The Versions

08/03 2016

dev-master

9999999-dev https://github.com/garethnic/unique

A Laravel package to make uuid fields in a database table

  Sources   Download

MIT

The Requires

 

The Development Requires

laravel uuid unique garethnic