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.
I changed to that you say --- see below ... here >>seeds/ContactsTableSeeder.php needed to create the table initially???
vagrant@homestead:~/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. vagrant@homestead:~/project1$
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.
rezwan-hossain liked this reply
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community