Package Data | |
---|---|
Maintainer Username: | garethnic |
Maintainer Contact: | gareth.nic@gmail.com (Gareth Nicholson) |
Package Create Date: | 2016-03-08 |
Package Last Update: | 2016-03-08 |
Home Page: | |
Language: | PHP |
License: | MIT |
Last Refreshed: | 2024-12-15 15:13:26 |
Package Statistics | |
---|---|
Total Downloads: | 8 |
Monthly Downloads: | 0 |
Daily Downloads: | 0 |
Total Stars: | 3 |
Total Watchers: | 3 |
Total Forks: | 0 |
Total Open Issues: | 0 |
This is a Laravel package that lets you add uuid's to a selected field.
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
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'
];
Please see CHANGELOG for more information what has changed recently.
$ composer test
Please see CONTRIBUTING and CONDUCT for details.
The MIT License (MIT). Please see License File for more information.