Many developers use Windows for PHP projects, we will cover a basic XAMPP Setup for a Laravel project. Following these easy steps will help you run your PHP projects and install Laravel on Windows in a matter of minutes.
C:\xampp\php
C:\xampp\mysql\bin
Now that we have Apache, PHP, MySQL and Composer installed, we’re ready to install Laravel, set a Virtual Host with a custom domain for local development. XAMPP’s Apache uses the htdocs folder for serving HTTP requests, we’ll set our custom Laravel Virtual Host under C:\xampp\htdocs\example\ which will be opened locally from example.com
cd C:\xampp\htdocs
composer create-project --prefer-dist laravel/laravel example
mysql -u root -p
CREATE DATABASE laravel DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci;
'mysql' => [ 'read' => [ 'host' => [ '192.168.1.1', '196.168.1.2', ], ], 'write' => [ 'host' => [ '196.168.1.3', ], ], 'sticky' => true, 'driver' => 'mysql', 'database' => 'laravel', 'username' => 'root', 'password' => 'THE ONE YOU CREATED THE USER WITH', 'charset' => 'utf8mb4', 'collation' => 'utf8mb4_unicode_ci', 'prefix' => '', ],
NameVirtualHost *:80 <VirtualHost example.com:80> DocumentRoot "C:\xampp\htdocs\example\public" ServerName example.com ServerAlias www.example.com <Directory "c:/xampp/htdocs/example/public"> Require all granted </Directory> </VirtualHost>
127.0.0.1 www.example.com example.com
Start Apache and MySQL, your local Laravel project will be opened from example.com and you’re ready to start working on it. When ready you can contact us to have it deployed on a WebHostFace server
You can benefit from a fast and reliable SSD Laravel Hosting with our shared hosting services. Now with a greatly discounted price! Start your new Laravel project on a professionally set hosting environment without investing a large amount of money and grow your online presence!