Commit c3317e6 1 parent 7b68a77 commit c3317e6 Copy full SHA for c3317e6
File tree 2 files changed +13
-6
lines changed
2 files changed +13
-6
lines changed Original file line number Diff line number Diff line change @@ -188,7 +188,7 @@ $request->validate([
188
188
]);
189
189
```
190
190
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:
192
192
193
193
``` php
194
194
use Illuminate\Support\Str;
@@ -203,7 +203,6 @@ to ensure that numbers generated on the same machine within the same millisecond
203
203
204
204
By default, if the application has a cache, then it uses the ` LaravelSequenceResolver `
205
205
which uses the Laravel cache to store the last sequence number.
206
-
207
206
If the application does not have a cache, then it uses the ` RandomSequenceResolver ` which
208
207
has no dependencies ** but is not concurrency-safe** .
209
208
Original file line number Diff line number Diff line change @@ -41,10 +41,18 @@ public function boot(): void
41
41
42
42
$ this ->registerMixins ();
43
43
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
+ });
48
56
}
49
57
50
58
/** Register custom mixins. */
You can’t perform that action at this time.
0 commit comments