If you’re developing a Laravel application, you’ve most likely used the php artisan serve command to start a local development server. But how do you stop it when you’re done? In this blog post, we will cover the steps to stop the PHP Artisan Serve in Command Prompt (CMD) on Windows.
Stopping PHP Artisan Serve
When you start the local development server using the php artisan serve command, it will keep running until you manually stop it. To stop the server, follow these simple steps:
- Open the command prompt where PHP Artisan Serve is running.
- Press Ctrl + C on your keyboard. This will send a signal to the CMD to stop the currently running process.
- Confirm that you want to stop the process by typing y and pressing Enter.
Here is what the process looks like in the Command Prompt:
C:\laravel_project>php artisan serve Laravel development server started: <http://127.0.0.1:8000> ^C Terminate batch job (Y/N)? y C:\laravel_project>
Now, the PHP Artisan Serve process has been successfully stopped, and you can close the command prompt or execute other commands as needed.
Conclusion
Stopping PHP Artisan Serve in CMD is as simple as pressing Ctrl + C and confirming the action. This keyboard shortcut is a standard way to stop command line processes in Windows, and it works not only for PHP Artisan Serve but also for other command line tools. Remember this shortcut and use it whenever you need to stop a running process in CMD.