Skip to content

Commit

Permalink
Docs
Browse files Browse the repository at this point in the history
  • Loading branch information
pelmered committed Nov 24, 2024
1 parent 29d9fe5 commit b1a78b0
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
7 changes: 6 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,9 @@ The hyphens also look pretty ugly and do not have any real meaning for a human.
- [x] ~~Add badges~~
- [ ] Implement custom formatter support

## Roadmap
- [ ] Migration tool for migrating an existing database with numeric or UUIDs to ULIDs. Probably as a separate suggested package.

## Installation
```bash
composer require pelmered/laravel-ulid
Expand Down Expand Up @@ -115,7 +118,9 @@ return new class extends Migration
### Facade

```php
ULID::make($model);
ULID::make(); // '1234567890123456789' - Normal ULID
ULID::make('p_', Carbon::parse('2010-11-12 01:02:03')); // 'u_1234567890123456789' - ULID with prefix
ULID::make('p_', 10, 10 ); // 'u_1234567890123456789' - ULID with prefix
ULID::fromModel($model);
ULID::isValidUlid('u_1234567890123456789', $model);
```
Expand Down
1 change: 1 addition & 0 deletions src/LaravelUlidServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ public function boot(): void
$model = new $model;
}

/** @var Ulidable $model */
$length = $model ? $model->getUlidLength() : 26;

/** @var Blueprint $this */
Expand Down

0 comments on commit b1a78b0

Please sign in to comment.