Skip to content

Commit

Permalink
Use same structure as factories for seeders (#620)
Browse files Browse the repository at this point in the history
  • Loading branch information
Samuell1 authored Sep 2, 2023
1 parent b055797 commit 4ce85e2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
7 changes: 3 additions & 4 deletions src/Scaffold/Console/CreateSeeder.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,9 @@ class CreateSeeder extends GeneratorCommandBase
public function makeStubs()
{
if ($this->isAppNamespace()) {
$this->makeStub('seeder/create_app_seeder.stub', 'database/seeds/{{studly_name}}.php');
}
else {
$this->makeStub('seeder/create_seeder.stub', 'updates/{{snake_name}}.php');
$this->makeStub('seeder/create_app_seeder.stub', 'database/seeders/{{studly_name}}.php');
} else {
$this->makeStub('seeder/create_seeder.stub', 'updates/seeders/{{studly_name}}.php');
}
}

Expand Down
2 changes: 1 addition & 1 deletion src/Scaffold/Console/seeder/create_seeder.stub
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?php namespace {{namespace_php}}\Updates;
<?php namespace {{namespace_php}}\Updates\Seeders;

use Seeder;

Expand Down

0 comments on commit 4ce85e2

Please sign in to comment.