0

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
  • 1
    In mac's terminal, you can also hit cmd+t to open a new tab and have another command line prompt available to you. No limit to terminal windows you can use!
    – fideloper
    Oct 2, 2013 at 19:47

1 Answer 1

2

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.

2
  • Yeah that seems to work thanks. What about if I've already ran 'php artisan serve' and then want to do an additional command after. Do I have to close down terminal and reopen, retyping 'php artisan serve &'? Sorry just doesn't seem that logical.
    – Liondedan
    Oct 2, 2013 at 19:18
  • edited to clarify
    – Antonio Carlos Ribeiro
    Oct 2, 2013 at 19:38

You must log in to answer this question.