Monday, November 4, 2019

Laravel : Running Laravel Valet on Windows

Installation

Make sure you open your terminal as an Administrator!
  1. Clone my fork of Valet and switch to the windows branch:
git clone https://github.com/cretueusebiu/valet.gitgit checkout windows
2. cd into the valet directory and run composer install
3. Because the package was not installed with Composer globally you have to add the valet directory your path.
4. This fork uses Acrylic instead of DnsMasq, you have to tell your computer that the DNS servers to be contacted for name resolution is no more your ISP’s but Acrylic: http://mayakron.altervista.org/wikibase/show.php?id=AcrylicWindows10Configuration
Now you can use Laravel Valet.

Caveats

  • The valet share command doesn’t work yet.
  • You need to do configure the DNS servers.
  • It may not work for you 😭.

Behind the scenes

There are two Windows Services that start when your computer starts. One is to run the built in PHP server on 127.0.0.1:80 and another one for Acrylic.

Troubleshooting

When you install/restart Valet you may get an alert from Acrylic, just click OK and ignore it.
If the domains don’t work make sure you have configured Acrylic.

1 comment:

Sample laravel db transaction