I\'m having problem starting my laravel installation. Whenever I type in the terminal \'php artisan serve\' it responses me an error:
Fai
When php artisan serve command given, below mentioned problem occured.
macridmi1109@Ridmis-MacBook-Pro kcnk % php artisan serve
Laravel development server started on http://localhost:8000/
[Thu Aug 6 11:31:10 2020] Failed to listen on localhost:8000 (reason: Address already in use)
Then try this line of code,
macridmi1109@Ridmis-MacBook-Pro project_laravel % ps -ef | grep php
Result will be,
501 66167 1 0 11:24am ttys002 0:00.77 /usr/bin/php -S localhost:8000 /Users/macridmi1109/Documents/Laravel/project_laravel/server.php
501 66268 64261 0 11:31am ttys002 0:00.00 grep php
Finally run the below code and, then again php artisan serve
macridmi1109@Ridmis-MacBook-Pro project_laravel % kill 66167
SOLUTION EXPLAINED BELOW
I use the command, ps -ef | grep php. After that, you will be able to find Process ID. After recognising the correct Process ID, use this command kill 66167 (kill "Process ID"). Then try php artisan serve. This worked for me.
Happy Coding