Wednesday, March 1, 2017

Run laravel in xampp without php artisan serve command

Tags



A lot of people that started to use laravel often power up their laravel project using command "php artisan serve" in command prompt. But what if you don't want to do it since it require typing and you only want to do it in a click of a button. If yes, then this tutorial is for you.

Okay before start this tutorial, make sure that you have your laravel project inside your xampp htdocs. If you forgot how to create laravel project, you can refer to this link. Create laravel project
You will need composer for this. Download it here. Composer

Alright, so let start. First, open httpd-vhosts.conf .

It usually located at C:\xampp\apache\conf\extra\httpd-vhosts.conf

Add the following lines at the end of the file:


In this case, I point to 127.0.0.1:80 and my domain name is 127.0.0.1

If you want to add custom domain, you can do it like this.



Next step, open hosts file. It located at C:\Windows\System32\drivers\etc\hosts

I using Window 10 so it should already allow access for localhost 127.0.0.1

For custom domain, just add the ip address and the domain name.
ex. 192.168.1.19       domain_name

Now restart your apache. You should be able to navigate to the laravel project by simply type localhost in the browser tab.


If you are facing any problem on this, don't hesitate to message at Obstrum facebook page.

Hope this tutorial will help those in need.

If you want to get in touch with more tutorial, add me on google+ or like and follow our facebook page for more! Obstrum Facebook Page


EmoticonEmoticon