[
21
]
You first need to start a new SSH session as mentioned before. Then, run the
following script:
serve example.app /home/vagrant/Code/example.app/public
Replace
example.app
with the host name you want to use. Then, add a new line to
your hosts file and you are good to go!
Connecting to your databases
Homestead runs a MySQL instance, which contains the data for all of your
configured applications. Laravel exposes the port of the MySQL server via port
forwarding, which means you can connect to it from your host machine by using a
database management tool such as Navicat, Sequel Pro, or MySQL Workbench. To
connect, all you have to do is specify the following parameters:
• Host: 127.0.0.1
• Port: 33060
• Username: homestead
• Password: secret
Once connected, you can then browse all of the databases on the Homestead virtual
machine, tables, and data, just as you would if the MySQL server was installed on
your machine.
Homestead also ships with a PostgreSQL database server. Connecting is the same as
with the MySQL database server, but you instead use port
54320
.
Do'stlaringiz bilan baham: |