I’m trying to make a CRUD app on laravel. server is on docker and localhost is on 0.0.0.0
SQLSTATE[HY000] [2002] No such file or directory (Connection: mysql, SQL: select * from `students`)
2
I think the problem lies within the model that you are try to calling. Check if you have created the Student model in app folder of your project.
if it is not there follow the guide to create and calling model through: https://laravel.com/docs/10.x/eloquent
change From
DB_HOST=localhost
To
DB_HOST=127.0.0.1
Click here to cancel reply.
2
Answers
I think the problem lies within the model that you are try to calling. Check if you have created the Student model in app folder of your project.
if it is not there follow the guide to create and calling model through:
https://laravel.com/docs/10.x/eloquent
change
From
To