Skip to content

Commit c3317e6

Browse files
committed
feat: add more info to about command
1 parent 7b68a77 commit c3317e6

File tree

2 files changed

+13
-6
lines changed

2 files changed

+13
-6
lines changed

README.md

+1-2
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,7 @@ $request->validate([
188188
]);
189189
```
190190

191-
You can also just use the `Str` macro to check if a value is a valid Snowflake:
191+
You can also just use the `Str::isSnowflake` macro to check if a value is a valid Snowflake:
192192

193193
```php
194194
use Illuminate\Support\Str;
@@ -203,7 +203,6 @@ to ensure that numbers generated on the same machine within the same millisecond
203203

204204
By default, if the application has a cache, then it uses the `LaravelSequenceResolver`
205205
which uses the Laravel cache to store the last sequence number.
206-
207206
If the application does not have a cache, then it uses the `RandomSequenceResolver` which
208207
has no dependencies **but is not concurrency-safe**.
209208

src/ServiceProvider.php

+12-4
Original file line numberDiff line numberDiff line change
@@ -41,10 +41,18 @@ public function boot(): void
4141

4242
$this->registerMixins();
4343

44-
AboutCommand::add('Laraflake', fn () => [
45-
'Sequence Resolver' => $this->getPrettyResolver(),
46-
'Version' => InstalledVersions::getPrettyVersion('calebdw/laraflake'),
47-
]);
44+
AboutCommand::add('Laraflake', function () {
45+
/** @var array{datacenter_id: int, worker_id: int, epoch: string} $config */
46+
$config = config('laraflake');
47+
48+
return [
49+
'Epoch' => $config['epoch'],
50+
'Datacenter ID' => $config['datacenter_id'],
51+
'Worker ID' => $config['worker_id'],
52+
'Sequence Resolver' => $this->getPrettyResolver(),
53+
'Version' => InstalledVersions::getPrettyVersion('calebdw/laraflake'),
54+
];
55+
});
4856
}
4957

5058
/** Register custom mixins. */

0 commit comments

Comments
 (0)