mirror of
https://github.com/barryvdh/laravel-ide-helper.git
synced 2026-08-18 01:57:13 +00:00
Fix model factory method arguments for Laravel >= 9 (#1361)
This commit is contained in:
@@ -1250,7 +1250,11 @@ class ModelsCommand extends Command
|
||||
return;
|
||||
}
|
||||
|
||||
$this->setMethod('factory', $factory, ['...$parameters']);
|
||||
if (version_compare($this->laravel->version(), '9', '>=')) {
|
||||
$this->setMethod('factory', $factory, ['$count = null, $state = []']);
|
||||
} else {
|
||||
$this->setMethod('factory', $factory, ['...$parameters']);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user