I have a Laravel project. I would like to know how can I run it and view the pages on my browser? Like for example, if I had a Django project, I would simply cd to it and type "python manage.py runserver" in the terminal to run the project. How can I do this with a Laravel Project?
3 Answers
Use the artisan serve command:
php artisan serve
5 Comments
Plato
So just cd to the project folder and run "php artisan serve"?
Joseph Silber
@Plato - Try it and see :)
Plato
Hi, I just tried that but it gives me an error "Laravel requires Mcrypt PHP Extension". But I already have it installed (I ran sudo apt-get install php5-mcrypt)
Joseph Silber
@Plato - Which version of PHP do you run?
Joseph Silber
@Plato - Follow the instructions here: stackoverflow.com/questions/16830405/…
Depends on your operating system (OSX, Windows, Linux) but I find that the software Laragon https://laragon.org is very good in providing everything you need, including apache, mysql, editing the host file, and sending (test) emails.