.env DB_HOST causes problems (127.0.0.1 vs localhost)
Hi,
if I set "DB_HOST" in .env to "127.0.0.1" I can run php artisan commands from console. But when I load my page in the browser, it refuses the connection.
If I set it to "localhost" it's vice versa. (I get "no such file or directory" error in console) Any ideas?
Do I have to be inside my vm to run those commands?
I'm kind of confused. Which commands need to be ran in the VM and which don't? Because I think some commands work outside the vm (if you're in your project's folder).
But okay, I'll try it out later (I'm not on my computer right now). Thank you :)
@Akeno all commands that make contact with the DB (or any other things installed on the VM) need to be run in the VM. Otherwise you can add as @bashy states your homestead IP address.
@Akeno than you need to get used to SSH into the VM, if you use laravel Elixir it is advisable to run that not on the VM but locally.
@bashy, yeah it has been a wile, started a new job last October and as a result I did not have any time left for some decent coding etc, now I'm starting to find some time to take a look at laracasts once in a while and to work on some of my personal hobby projects :) All well on your side?