If you are working on a project with Laravel, you have more than one way to run it locally. You can use: https://laravel.com/docs/9.x/valet: runs Nginx in the background and using DnsMasq, Valet proxies all requests on the *.test domain to point to sites installed on your local machine"; A web server with FPM (FastCGI Process Manager); in this case, you have to configure the web server manually; https://laravel.com/docs/sail: using the Docker approach, Sail is a light-weight command-line interface for interacting with Laravel Docker images. Sail provides a great starting point for building a Laravel application using PHP, MySQL, Redis, and Swoole (useful for Laravel Octane) using Docker images.

For the other resources, Vite will forward (as a proxy) the requests to the Laravel web server (running on port 8000).

Now you can launch two services: npm run dev for starting the Vite (with HTTPS thanks to the basicSsl plugin and the configuration we did; php artisan serve for starting the Laravel web server
Newsletter

Get the latest Laravel/PHP jobs, events and curated articles straight to your inbox, once a week

Glimpse streamlines Laravel development by seamlessly deploying GitHub pull requests to preview environments with the help of Laravel Forge. Glimpse streamlines Laravel development by seamlessly deploying GitHub pull requests to preview environments with the help of Laravel Forge.
Fathom Analytics | Fast, simple and privacy-focused website analytics. Fathom Analytics | Fast, simple and privacy-focused website analytics.
Shirts painstakingly handcrafted by under-caffeinated developers. Shirts painstakingly handcrafted by under-caffeinated developers.
Community Partners