davy_yg's avatar
Level 27

php artisan serve

Hello,

I have been using laravel for a while and I still wonder why I could choose between using php artisan serve or call directly from the url and it still works just fine.

Is that true?

Do we really have that option between using php artisan serve or can call directly from the url?

The codes is slightly different if I am using php artisan serve and if I am not.

0 likes
6 replies
Snapey's avatar

read up what a web server does if you want to be a web developer

1 like
davy_yg's avatar
Level 27

What is the point of using php artisan serve?

Tray2's avatar

Like @sergiu17 said php artisan serve is the same thing as php -s it's just some syntactic sugar.

It's php's built in server that should be used strictly for development and not in production.

If you have Larvel Valet, Homestead or your own LAMP/LEMP stack installed on your local machine, server or virtual machine you don't need to use that command.

I only use it if I for some reason can't access the other options.

Please or to participate in this conversation.