This is a simple command to stop an abandoned laravel server in php composer. If you made the mistake of closing the terminal or visual code for example while running a laravel application, this is what way you can stop it from serving port 8000.

Find the PID running port 8000:

lsof -i :8000

Example OUTPUT:

COMMAND   PID      USER   FD   TYPE DEVICE SIZE/OFF NODE NAME
php7.4  13657 developer    6u  IPv4  90120      0t0  TCP localhost:8000 (LISTEN)

Once you have the PID number, you can kill it with super user:

sudo kill -9 [PID]

Open your broswer again to http://localhost:8000 you will get an error as its not running anymore

Good luck.