Local Laravel Development with Laragon
Master setting up a local PHP/Laravel development environment on Windows without complex CLI configurations using Laragon's one-click tooling.
This course covers installing Laragon Full, spinning up Laravel instances via Quick App, configuring local virtual hosts, troubleshooting server connections, modifying Blade views in Visual Studio Code, and utilizing Laragon's built-in Terminal, Root, and Database tools.
Section 1: Environment Setup and Installation
Download and install Laragon Full to set up local Apache, MySQL, and Mailpit services.
Lesson 1.1: Installing Laragon
- Laragon download
- Windows SmartScreen override
- Drive selection
Laragon provides an isolated, portable web development stack for Windows. To begin, download the Full edition from laragon.org. The Full package contains Apache, MySQL, PHP, and Mailpit.
During installation on modern Windows systems, Microsoft Defender SmartScreen may display an unrecognized app notice. Click 'More info' and select 'Run anyway'. Choose your desired install location (such as E:\laragon) and complete the wizard.
Practical work
- Download the Laragon Full installer from laragon.org.
- Run the installer, bypass the SmartScreen prompt, and install to a preferred drive location.
Lesson 1.2: Starting Local Services and Managing Permissions
- Start All services
- Firewall permissions
- Laragon UI overview
Once Laragon is installed, launch the control panel and click 'Start All'. This command spins up the Apache HTTP server, MySQL database engine, and Mailpit.
Windows Defender Firewall will prompt you to allow Apache and MySQL network access. Grant access to both private and public networks as requested so the local server can bind to ports 80 and 3306 without interference.
Practical work
- Launch Laragon and click the 'Start All' button.
- Accept all administrative and Windows Defender Firewall network access requests.
Section 2: Project Creation and Customization
Scaffold a new Laravel project, resolve local DNS routes, edit view templates, and navigate Laragon utility shortcuts.
Lesson 2.1: Creating a Laravel App with Quick App
- Quick App menu
- Project naming
- Automated Composer installation
Laragon's 'Quick app' feature automates Composer project creation. Open Laragon's Menu, navigate to 'Quick app', and choose 'Laravel'.
Enter a project name (such as 'bentech') and click 'OK'. Laragon creates a corresponding MySQL database, provisions the directory in 'laragon/www/{projectname}', and runs the underlying Composer create-project script in a console window.
Practical work
- Navigate to Menu > Quick app > Laravel.
- Enter a project name and click OK.
- Wait for the automated Composer installation process to complete.
Lesson 2.2: Testing Virtual Hosts, Editing Views, and Tools
- Virtual host testing
- Restarting services
- Editing welcome.blade.php
- Root, Terminal, and Database tools
Laragon automatically configures virtual hosts ending in '.test'. Copy the provided project URL (e.g., http://bentech.test) into your browser. If a connection error occurs initially, click 'Stop' in Laragon and then 'Start All' to refresh the web server routes, then refresh the page.
Open your project folder in VS Code via '{Drive}:\laragon\www\{projectname}'. Open 'resources/views/welcome.blade.php' and update template text (e.g., change the banner text to 'WELCOME TO BENTECH') to verify real-time editing.
Finally, take advantage of Laragon's quick-access controls: 'Root' reveals project files in Windows Explorer, 'Terminal' opens an integrated CLI with preconfigured environment paths, and 'Database' launches HeidiSQL for database management.
Practical work
- Open the generated '.test' project URL in your browser.
- Perform a Stop and Start All cycle in Laragon if a connection error occurs.
- Open the project directory in VS Code and modify 'resources/views/welcome.blade.php'.
- Test the 'Root', 'Terminal', and 'Database' buttons in the Laragon dashboard.