Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

revert 'php artisan serve' command in laravel

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.

like image 402
halkujabra Avatar asked May 29 '14 11:05

halkujabra


People also ask

How do I exit artisan serve in php?

Simply use Ctrl + C .

What is php artisan serve command?

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.

Can I run Laravel without php artisan serve?

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.


3 Answers

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

like image 82
Mohammed Omer Avatar answered Oct 13 '22 17:10

Mohammed Omer


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.

like image 45
jsalonen Avatar answered Oct 13 '22 17:10

jsalonen


I used Ctrl + C in my mac for stop the command php artisan laravel serve

like image 39
David Noleto Avatar answered Oct 13 '22 18:10

David Noleto