@@ -31,7 +31,7 @@ public function output(Tree $tree): array
31
31
32
32
$ output = [];
33
33
34
- if ($ this ->isLaravel8Up ()) {
34
+ if ($ this ->isLaravel8OrHigher ()) {
35
35
$ stub = $ this ->files ->stub ('seeder.stub ' );
36
36
} else {
37
37
$ stub = $ this ->files ->stub ('seeder.no-factory.stub ' );
@@ -55,7 +55,7 @@ public function types(): array
55
55
protected function populateStub (string $ stub , string $ model )
56
56
{
57
57
$ stub = str_replace ('{{ class }} ' , $ this ->getClassName ($ model ), $ stub );
58
- if ($ this ->isLaravel8Up ()) {
58
+ if ($ this ->isLaravel8OrHigher ()) {
59
59
$ this ->addImport ($ model , 'Illuminate\Database\Seeder ' );
60
60
61
61
$ stub = str_replace ('// ' , $ this ->build ($ model ), $ stub );
@@ -73,7 +73,7 @@ protected function getClassName(string $model)
73
73
74
74
protected function build (string $ model )
75
75
{
76
- if ($ this ->isLaravel8Up ()) {
76
+ if ($ this ->isLaravel8OrHigher ()) {
77
77
$ this ->addImport ($ model , $ this ->tree ->fqcnForContext ($ model ));
78
78
return sprintf ('%s::factory()->times(5)->create(); ' , class_basename ($ this ->tree ->fqcnForContext ($ model )));
79
79
}
@@ -100,7 +100,7 @@ private function getPath($model)
100
100
return 'database/seeds/ ' .$ model .'Seeder.php ' ;
101
101
}
102
102
103
- protected function isLaravel8Up ()
103
+ protected function isLaravel8OrHigher ()
104
104
{
105
105
return version_compare (App::version (), '8.0.0 ' , '>= ' );
106
106
}
0 commit comments