Skip to content

Commit

Permalink
added some doc for binary uuid trait
Browse files Browse the repository at this point in the history
  • Loading branch information
alsofronie committed Dec 15, 2015
1 parent 6e28694 commit 38bc40a
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,12 @@ So, the schema definition should be something like this (please double check if
?>
```

There are two additional notes for this particular trait.

> Note 1. In order to get a string representation of your uuid, simple call `$model->id_string` and you'll get it.
> Note 2. You can use `User::find($uuid)` with both the binary version or the string (bin2hex) version.
#### In your models

In order to use this in your models, just put `use Uuid[32|Binary]ModelTrait;`:
Expand All @@ -94,3 +100,7 @@ class User extends Eloquent
}
```

## Running tests

To run the tests, just run `composer install` and `./vendor/bin/phpunit`.

0 comments on commit 38bc40a

Please sign in to comment.