Closed bedirhandev closed 2 weeks ago
I have a workaround as a solution but would be nice to have a proper solution:
In the PluginModelFactory file a namespace is changed to "Database\Factories" and also in the DatabaseSeeder file a namespace is changed to "Database\Seeder".
I expected that in the composer.json file in the section "autoload", "psr-4" the lines would solve this issue.:
"WordpressPluginTemplate\\Database\\Factories\\": "src/database/factories/",
"WordpressPluginTemplate\\Database\\Seeders\\": "src/database/seeders/",
Now running the command: wp acorn db:seed
works as expected. It could be a namespace issue.
I have updated the documentation on how to perform the seeding. Because the namespaces difference from default Laravel convention, you have to pass in the seeder class so it knows what to use. I have pushed an update as the factories were not resolving as well. See #4
Hello,
I noticed when using the command "wp acorn db:seed" the following error occurs:
This command is executed from WSL2 on Windows, other commands such as "wp acorn make:migration" works.
How could this be resolved?