I was running
$ php artisan migrate db:seed --class="dashboard/DashboardSeeder" --database="mysql2"
Should have been
$ php artisan db:seed --class="dashboard/DashboardSeeder" --database="mysql2"
without "migrate".
I have two databases and therefore have a subfolder in migrations and seeds for the second database. For seeds i have a dashboard/DashboardSeeder.php under seeds that acts as the DatabaseSeeder root seed class for the second database. However, when i try to populate, I receive the following error:
$ php artisan migrate db:seed --class="dashboard/DashboardSeeder" --database="mysql2"
[RuntimeException]
Too many arguments.
It seems no matter where I put the DashboardSeeder or the Seeder, whether in seeds or seeds/dashboard, it runs, or referring to the seeder by itself, I always receive this error. I don't think it likes having a custom class and custom database. Here's the -v errors:
Exception trace:
() at /home/vagrant/Code/Appy/vendor/symfony/console/Input/ArgvInput.php:177
Symfony\Component\Console\Input\ArgvInput->parseArgument() at /home/vagrant/Code/Appy/vendor/symfony/console/Input/ArgvInput.php:86
Symfony\Component\Console\Input\ArgvInput->parse() at /home/vagrant/Code/Appy/vendor/symfony/console/Input/Input.php:61
Symfony\Component\Console\Input\Input->bind() at /home/vagrant/Code/Appy/vendor/symfony/console/Command/Command.php:221
Symfony\Component\Console\Command\Command->run() at /home/vagrant/Code/Appy/vendor/laravel/framework/src/Illuminate/Console/Command.php:136
Illuminate\Console\Command->run() at /home/vagrant/Code/Appy/vendor/symfony/console/Application.php:838
Symfony\Component\Console\Application->doRunCommand() at /home/vagrant/Code/Appy/vendor/symfony/console/Application.php:189
Symfony\Component\Console\Application->doRun() at /home/vagrant/Code/Appy/vendor/symfony/console/Application.php:120
Symfony\Component\Console\Application->run() at /home/vagrant/Code/Appy/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php:107
Illuminate\Foundation\Console\Kernel->handle() at /home/vagrant/Code/Appy/artisan:36
Any info/tips are appreciated. Thanks!
I was running
$ php artisan migrate db:seed --class="dashboard/DashboardSeeder" --database="mysql2"
Should have been
$ php artisan db:seed --class="dashboard/DashboardSeeder" --database="mysql2"
without "migrate".
Please or to participate in this conversation.