I have a laravel app. I ran 'php artisan serve'
command for local testing and my app was served at localhost:8000. But now I want to stop serving it at localhost:8000 ie., I want it not to serve now.
I closed the command line, restarted the server but it is still serving. How can it be done?
Note: I am using windows for testing purposes.
Simply use Ctrl + C .
The Laravel PHP artisan serve command helps running applications on the PHP development server. As a developer, you can use Laravel artisan serve to develop and test various functions within the application. It also accepts two additional options. You can use the host for changing application's address and port.
and you can run laravel without artisan. If you rename server. php and copy . htaccess , it may make trigger some error when you try to run auth artisan command.
here is what i do
press ctrl
+ c
> lsof -i :8000
to check if the port is busy or not if any process is listening to the port 8000 it will be displayed with port id
> sudo kill -9 [PID]
kill the process that listen to that port id
run lsof agin
> sudo lsof -i 8000
vola
Press Ctrl
+ Shift
+ ESC
. Locate the php process running artisan and kill it with right click -> kill process
.
Reopen the command-line and start back the server.
Note that you should be able to kill the process just by sending it a kill signal with Ctrl
+ C
.
I used Ctrl + C in my mac for stop the command php artisan laravel serve
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With