You can download and install XAMPP at https://www.apachefriends.org/download.html. I assume you already have composer installed in your machine and you already know how to create Laravel projects using composer. If not, you might want to check my previous tutorial at: http://safventure.live/set-up-laravel-project-in-a-virtual-machine-with-laravel-homestead.
- Follow the steps below. Open XAMPP and click config in Apache then choose apache(httpd.conf) on the dropdown.
- Find all with 80 and change it to 81. Save then close.
- Then, go to C:\xampp\apache\conf\extra . Open httpd-vhosts.conf file.
Put this at the end of the file.
Blog is the name of my Laravel project that is inside in the htdocs folder. Proceed by changing it with your Laravel project.
ServerAdmin firstname.lastname@example.org DocumentRoot C:\xampp\htdocs\blog\public ServerName 127.0.0.1:81
- Suppose your port 3306 is not available because you are already using it. In that case we’ll make our port to 3307. To change it click config in MySQL and open my.ini
- Change to port 3307. Save then close.
- Start Apache and MySQL. Then open your Laravel project in http://127.0.0.1:81/
- Change db settings like below in .env file.
- Lastly, run laravel migration – php artisan migrate.