Skip to content

Commit 0e802ba

Browse files
committed
add fix on seed method
1 parent f5caa83 commit 0e802ba

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/Schema.php

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -313,7 +313,12 @@ public static function seed(string $fileToSeed): bool
313313

314314
if (strpos($fakerMethod, ':') !== false) {
315315
$fakerMethod = explode(':', $fakerMethod);
316-
$localFakerInstance = $localFakerInstance->{$fakerMethod[0]}($fakerMethod[1]);
316+
if (strpos($fakerMethod[1], ',') !== false) {
317+
$array_params = explode(",",$fakerMethod[1]);
318+
$localFakerInstance = $localFakerInstance->{$fakerMethod[0]}($array_params);
319+
} else {
320+
$localFakerInstance = $localFakerInstance->{$fakerMethod[0]}($fakerMethod[1]);
321+
}
317322
} else {
318323
$localFakerInstance = $localFakerInstance->{$fakerMethod}();
319324
}

0 commit comments

Comments
 (0)