Laravel Command Line Stuck

Laravel Command Line Stuck

This might seem like a dumb question, but I’m pretty new to the command line work. I’m on mac and when I type in “php artisan serve” everything runs great, the server starts, I get a message telling me that the server has begun etc…

However once the server is running the cursor in my prompt is “stuck”. I can’t type anything else and it just sits there. I noticed in a video the sceen caster, types ^C so he can continue typing.

Any ideas?

Thank you

答案1

If you want it to keep serving and give your command line back, run it as

php artisan serve &

EDIT:

You'll still be able to use artisan and, even if you close your terminal, serve will still be running. Just issue your commands to artisan and see what happens.

This artisan serve command calls ´php -S´ wich is the PHP's Built-in web server. So you're not really running your application.

相关内容