Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

Darrell's avatar

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.

0 likes
4 replies
tykus's avatar
tykus
Best Answer
Level 104
php artisan db:seed --class=UsersSeeder
3 likes
Darrell's avatar

Thank you. I will now slap myself across the face repeatedly.

tykus's avatar

We've all been there...

1 like
pafait's avatar

Thanks for this clue @tykus it help me alot @Darrell i will not only slap myself i will do more than that lol. thanks again guys

Please or to participate in this conversation.