Deploy Laravel API and MySQL-Problems
Hello everybody. First, I am a newbie in Laravel.
I have programmed an API that works fine local. Now I wanted to deploy this API to an existing Nginx server. I have set up some in my MySQL. And a "php artisan migrate" was successful. So everything works on the terminal. And I'm also on the direct url (currently on a VM) on the Laravel home page. But / home throws me the following error "Error establishing a database connection". I do not understand that. So the data in the. Env should be right, if I can create tables on the console. Basically, I do not need subpages. Actually, I just want to call my API. So GET, POST, PUT and DELETE. I thought that I do about 192.168.2.109/mtb/api/ROUTE. But that does not work that way either.
What am I doing wrong? I hope you feel sorry for a desperate beginner. I have been at the googlen since yesterday at noon (German time).
Best regards,
Helge
Please or to participate in this conversation.