-
Notifications
You must be signed in to change notification settings - Fork 1.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Command Line Seeding Error #601
Comments
Sorry - looks like that portion of the docs is incorrect. And at a glance I'm not seeing any docs about what it should be. Bad me. try this:
|
So the command works, but it can't find my seed
|
I believe it doesn't handle namespaced classes at the moment, so try removing any namespace from the seeds. I guess that needs fixing. |
I was wrong, it should support namespaced files just fine. Can you show me the basics of your TestSeeder class and where it's located? |
namespace App\Database\Seeds;
use CodeIgniter\Database\Seeder;
class TestSeeder extends Seeder
{
public function run()
{
$this->call(ProductCategorySeeder::class);
$this->call(ProductSeeder::class);
}
} |
Remove the namespace from your Seeder and you should be good. |
@lonnieezell Thanks, I'll do that! But shouldn't it support namespaces as you mentioned? |
The documentation says to run
php index.php migrations seed TestSeeder
to seed data from the command line, but running this command produces the error:Looks like it should be
php ci.php db:seed TestSeeder
?The text was updated successfully, but these errors were encountered: