Support the ongoing development of Laravel.io →
2 years ago
Last updated 2 weeks ago.
0

the credentials are wrong. the username should be homestead and password secret. Those should already be configured in the config/database.php on fresh install.

0

I changed to that you say --- see below ... here >>seeds/ContactsTableSeeder.php needed to create the table initially???

[email protected]:~/project1$ php artisan migrate --seed Migration table created successfully. Migrating: 2014_10_12_000000_create_users_table

Migrated: 2014_10_12_000000_create_users_table (0.07 seconds)

Migrating: 2014_10_12_100000_create_password_resets_table

Migrated: 2014_10_12_100000_create_password_resets_table (0.09 seconds)

Migrating: 2019_08_19_000000_create_failed_jobs_table

Migrated: 2019_08_19_000000_create_failed_jobs_table (0.07 seconds)

Migrating: 2020_04_16_190755_create_dogs_table

Migrated: 2020_04_16_190755_create_dogs_table (0.05 seconds)

Seeding: ContactsTableSeeder

Illuminate\Database\QueryException : SQLSTATE[42S02]: Base table or view not found: 1146 Table 'homestead.contacts' doesn't exist (SQL: insert into contacts (name, email) values (Tim Cook, [email protected]))

at /home/vagrant/project1/vendor/laravel/framework/src/Illuminate/Database/Connection.php:665 661| // If an exception occurs when attempting to run a query, we'll format the error 662| // message to include the bindings with SQL, which will make this exception a 663| // lot more helpful to the developer instead of just the database's errors. 664| catch (Exception $e) {

665| throw new QueryException( 666| $query, $this->prepareBindings($bindings), $e 667| ); 668| } 669|

Exception trace:

1 PDOException::("SQLSTATE[42S02]: Base table or view not found: 1146 Table 'homestead.contacts' doesn't exist") /home/vagrant/project1/vendor/laravel/framework/src/Illuminate/Database/Connection.php:453

2 PDO::prepare() /home/vagrant/project1/vendor/laravel/framework/src/Illuminate/Database/Connection.php:453

Please use the argument -v to see more details. [email protected]:~/project1$

Last updated 2 years ago.
0

The migrations didn't create any contacts table. If my comment helped, please accept it as an answer. If you need more help, please open a new thread.

1

Sign in to participate in this thread!

Full Stack Europe

Your banner here too?

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

The Laravel portal for problem solving, knowledge sharing and community building.

© 2022 Laravel.io - All rights reserved.