How to install Valet (Laravel) on Windows 10?
Want to work on Laravel- World's #1 for PHP development framework platform but don't know how to install its development environment- Valet on Windows 10 machine?
Well, then here you can have quick steps to refer and try on your own.
First What is Valet?
Valet is the development environment for Laravel. Its super easy and requires no etc/host file or any sort of big configuration. You can publish your sites publically using local configurations.
Valet is famous because it is independent of Aparach or Nginx. It uses DnsMasq on Mac OS and Acrylic DNS on Windows. Earlier it was only available for Mac OS users but now its open for Windows users as well.
Acrylic DNS is used to proxy all request to *.test domain so we wont need any host files to get configured.
It is also famous for the fact of faster installations with minimal requirement.
Valet also supports Drupal ,Joomla, Zend apart from Laravel. Here you will know how to install Valet for Laravel.
For that your system needs to have:
1. PHP installed.
2. Composer installed.
Following are few quick steps how to install Valet, follow it and you can really build something amazing on your own.
1. Run cmd as an administrator.
2. Run the command - composer global require cretueusebiu/valet-windows to install it globally.
3. Run valet install
This will install Valet on your machine.
Now we need to do some basic windows configurations for Acrylic DNS
1. Go to Control Panel - Network and Internet
2. Open Network Status and Tasks
3. Go to Change Adapter Settings
4. Click on Wifi and right click to get Properties.
5. In Properties - Network Tab - double click on Internet Protocol Version 4 (TCP/iPV4)
6. Choose - Use the following DNS server addresses and set 127.0.0.1 as Preferred DNS server. Click OK.
7. Similarly ouble click on Internet Protocol Version 6 (TCP/iPV6)
8. Choose - Use the following DNS server addresses option and set ::1 as the Preferred DNS server. Click OK.
Thats it.
Now you need to be in the folder where you will be running your laravel application from. Go to that folder in cmd.
Now if you dont have laravel installed on your machine install it from
1.composer global require "laravel/installer"
2. Make new application using - laravel new yoursitename
3. Then run- valet park - This will register the current working (or specified) directory with Valet
4. Run - valet link - This will link the current working directory to Valet
5. Run - valet secure yoursitename - this will secure the given domain with a trusted TLS certificate
Thats all!
Go in browser and type yoursitename.test - You will be landed on your laravel page :)