Introduction of Valet


Valet as document says is a Laravel development environment for Mac minimalists. I have been using valet since it was released and loving it. Though document says for mac minimalist, we can use valet in windows and linux too.

Laravel Valet configures our machine to always run Nginx in the background. The default domain right now is *.test. You can even change that too.

We can run many php frameworks & cms out there like laravel, symfony, slim, zend, wordpress and many other. We don’t need to configure apache virtualHost in etc/hosts.

Installing valet on your machine :

Install mysql & php on your machine.

Now installing valet globally using the composer.

once the composer is done installing valet.

Run the valet install command. This will configure and install Valet and DnsMasq, and register Valet’s daemon to launch when your system starts.

some useful commands :

valet install : To install the valet

valet restart : Restart valet

valet link folder-name : to link only one specific folder from the directory

valet forget : remove the current directory from parked.

valet paths : view all the parked paths

valet stop : stop the valet

valet park : Enter the command to register your current directory as a path that valet will search for sites. Once you enter the above command. If you create a project name demo, it can be served using demo.test

valet share : One of the amazing feature of valet,we can even share our sites publicly using local tunnels.

valet uninstall : uninstall valet entirely

There are many other things we can do with valet. For now i’ll leave with this much information, you can dig in more and share in comments.

For windows :

For Linux :

Some of the information may not work on windows & linux exactly but the commands will  work on all the os the same way. Happy coding 😎

Sharing is caring!

Related Post