Laravel Valet

Introduction

With only 4 steps we have the best development environment (for Mac) we will ever imagine! Valet is the “php artisan serve” without ever having to run it… (Taylor Otwell’s actual words). It hooks into your system’s PHP server using DnsMasq to proxy all the requests to a .dev local site. It supports Laravel, Lumen, and Statamic apps and it is the best alternative of Homestead. For more go to official page.


Installation

As I said before there are 4 steps but it can require more.

  1. At first you have to have installed and the recent version of Homebrew. To update type in your terminal “brew update”.
  2. Then make sure you have brew services available. Type “brew services list” and make sure you get valid output. If you don’t, add it.
  3. Install php 7.0 typing “brew install php70”
  4. Intall Laravel Valet typing “composer global require laravel/valet”
  5. Run the “valet install” command to make the Valet’s daemon launch when your system starts.
  6. Finally go to your folder where you have all your Laravel projects and run “valet park”

Thats it! From now on you have a full configured php development environment without writing just even one command! Just open your browser and type the name of your project following the .dev TLD.

ex. my-project.dev