We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5f90b72 commit c99d45bCopy full SHA for c99d45b
src/Illuminate/Support/Str.php
@@ -1375,11 +1375,16 @@ public static function createUuidsNormally()
1375
/**
1376
* Generate a ULID.
1377
*
1378
+ * @param \DateTimeInterface|null $time
1379
* @return \Symfony\Component\Uid\Ulid
1380
*/
- public static function ulid()
1381
+ public static function ulid($time = null)
1382
{
- return new Ulid();
1383
+ if ($time === null) {
1384
+ return new Ulid();
1385
+ }
1386
+
1387
+ return new Ulid(Ulid::generate($time));
1388
}
1389
1390
0 commit comments