diff --git a/README.md b/README.md index 533bc9c..736ab33 100755 --- a/README.md +++ b/README.md @@ -188,7 +188,7 @@ $request->validate([ ]); ``` -You can also just use the `Str` macro to check if a value is a valid Snowflake: +You can also just use the `Str::isSnowflake` macro to check if a value is a valid Snowflake: ```php use Illuminate\Support\Str; @@ -203,7 +203,6 @@ to ensure that numbers generated on the same machine within the same millisecond By default, if the application has a cache, then it uses the `LaravelSequenceResolver` which uses the Laravel cache to store the last sequence number. - If the application does not have a cache, then it uses the `RandomSequenceResolver` which has no dependencies **but is not concurrency-safe**. diff --git a/src/ServiceProvider.php b/src/ServiceProvider.php index ede00d2..835bfdc 100644 --- a/src/ServiceProvider.php +++ b/src/ServiceProvider.php @@ -41,10 +41,18 @@ public function boot(): void $this->registerMixins(); - AboutCommand::add('Laraflake', fn () => [ - 'Sequence Resolver' => $this->getPrettyResolver(), - 'Version' => InstalledVersions::getPrettyVersion('calebdw/laraflake'), - ]); + AboutCommand::add('Laraflake', function () { + /** @var array{datacenter_id: int, worker_id: int, epoch: string} $config */ + $config = config('laraflake'); + + return [ + 'Epoch' => $config['epoch'], + 'Datacenter ID' => $config['datacenter_id'], + 'Worker ID' => $config['worker_id'], + 'Sequence Resolver' => $this->getPrettyResolver(), + 'Version' => InstalledVersions::getPrettyVersion('calebdw/laraflake'), + ]; + }); } /** Register custom mixins. */