Laravel Valet is primarily designed for macOS. However, you can use Laravel Valet on Windows through a similar tool called Laravel Valet for Windows, which is not the same as the macOS version but provides similar functionality. Here’s a general guide on how to set up Laravel Valet for Windows:

  1. Install Required Software:
    • Before installing Laravel Valet for Windows, you need to ensure that you have the necessary software installed on your system:
      • PHP
      • Composer
      • Node.js
      • NPM
      • WSL (Windows Subsystem for Linux) or Git Bash
  2. Install Laravel Valet for Windows:
    • You can install Laravel Valet for Windows using Composer. Open a command prompt or terminal and run the following command:
    • composer global require cretueusebiu/valet-windows
  3. Initialize Valet:
    • Once installed, you need to initialize Valet by running the following command:
    • valet install
  4. Configure DNS:
    • Laravel Valet for Windows does not support TLD spoofing like Laravel Valet for macOS. Instead, it modifies the hosts file to simulate domain resolution. Acrylic DNS will be used in the setup. Ensure that your DNS resolver is set to “localhost”.
      • Go to Control Panel\Network and Internet\Network Connections
      • Choose the network and select its properties
      • Change the Internet Protocol Version 4 (TCP/IPv4) Properties window to use 127.0.0.1 and 8.8.8.8 as the IP addresses under Use the following DNS server addresses
    • You may also need to run the command prompt or terminal as administrator to modify the hosts file.
  5. Start Valet:
    • After installation and configuration, start Valet by running the following command:
    • valet start
  6. Park a Directory:
    • Navigate to your project directory and park it using the following command:
    • mkdir Sites
    • cd Sites
    • valet park
  7. Access Your Projects:
      • Your Laravel projects inside Sites/ folder should now be accessible via the <foldername.test> domain name. By default, Valet serves sites on the .test domain.