php artisan db:seed --class=UsersSeeder
Feb 12, 2017
4
Level 1
php artisan seeding error: Too many arguments
When I run
php artisan db:seed class="UsersSeeder"
I get the error:
[Symfony\Component\Console\Exception\RuntimeException]
Too many arguments, expected arguments "command".
I have two seeders in my project, they both throw the same error. There is clearly only the one argument in the artisan command.
I've tried composer update and composer dump-autoload. I've spent a few hours on Google and have not found a clue.
I know these seeds work as they worked until very recently. I cannot think what I have done to cause them to break. Here is the UsersSeeder:
use Illuminate\Database\Seeder;
use App\User;
class UsersSeeder extends Seeder
{
public function run()
{
User::create(
[
'storeID' => 1,
'employeeNum' => 12345678,
'firstName' => 'Firstname',
'lastName' => 'Lastname',
'tel1' => '1234567890',
'tel2' => null,
'email' => 'email@address',
'password'=>'xxxxx',
'remember_token' => null,
'created_at' => date( 'Y-m-d H:i:s' ),
'updated_at' => date( 'Y-m-d H:i:s' )
]);
}
}
This is a Laravel 5.3 project. I am a bit new at this and do not know where else to look. Google has turned up very little. Thank you for any thoughts.
Level 104
3 likes
Please or to participate in this conversation.