Skip to content

Commit bbf914e

Browse files
authored
Create README.md
1 parent 297ca57 commit bbf914e

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed

README.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# Laravel-UUID
2+
A wrapper for webpatser/laravel-uuid with additional integration
3+
4+
This package adds a very simple trait to automatically generate a UUID for your Models.
5+
6+
Simply add the "\BinaryCabin\LaravelUUID\Traits\HasUUID;" trait to your model:
7+
8+
```
9+
<?php
10+
11+
namespace App;
12+
13+
use Illuminate\Database\Eloquent\Model;
14+
15+
class Project extends Model
16+
{
17+
18+
use \BinaryCabin\LaravelUUID\Traits\HasUUID;
19+
20+
}
21+
```
22+
23+
If your column name is not "uuid", simply add a new property to your model named "uuidFieldName":
24+
25+
protected $uuidFieldName = 'unique_id';

0 commit comments

Comments
 (0)