Skip to content

Commit

Permalink
add objectId docs
Browse files Browse the repository at this point in the history
  • Loading branch information
juliangut committed May 24, 2019
1 parent 0b1be7c commit ea900e5
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,21 @@ Require composer autoload file
require './vendor/autoload.php';
```

#### Mongo ObjectId

You need to install and enable ext-mongodb through your distro's repos or PECL

```
sudo pecl install mongodb
```

```php
use Gears\Identity\Extra\ObjectIdIdentity;
use MongoDB\BSON\ObjectId;

$identity = ObjectIdIdentity::fromString((string) new ObjectId());
```

#### ULID (Universally Unique Lexicographically Sortable Identifier)

you need to require https://github.com/robinvdvleuten/php-ulid
Expand Down

0 comments on commit ea900e5

Please sign in to comment.