I am building a basic CRUD app using Laravel 7 Homestead in a Vagrant VM. The root address http://crud-app.local.test
works, but when I add a defined route ( http://crud-app.local.test/cats
) I get this error page:
Error message in browser when navigating to '/cats' route.
So far I have:
.env
file and in practice.env
file)php artisan config:cache
php artisan config:clear
followed by php artisan cache:clear
127.0.0.1
to localhost
.env
file exists ( crud
)php artisan migrate
(no errors, and the cats
table exists in the crud
database) vagrant reload --provision
)I'm at a loss now.
Make sure that you give "root" permissions to read from the database that you've created. As it's root@localhost rather than root@127.0.0.1 sometimes mysql differentiates. Just check the permissions that root@localhost has for the database and if you update them, flush the privileges.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.