Home Laravel php artisan serve not working in Laravel

php artisan serve not working in Laravel

by Shahriar Sagor

Today now in this post i will give you an example of laravel php artisan serve not working. Here I would like to show you an example of php artisan serve not working ubuntu laravel. We can see php artisan serve not working in laravel 9 application. So let’s discuss about the laravel command php artisan serve not working. Let’s see the bellow example php artisan serve not working in laravel application.

We can use this example with laravel 6, laravel 7, laravel 8 and laravel 9 any version.

Generally, php artisan serve command is works perfectly. Even the port is busy then it is starts with another port. but even if it’s not working with you then here I will help you manually run laravel application by using php. so let’s start and see the following ways to run your laravel app without using php artisan serve command:

Example 1: Run Laravel App using php Command

Here, i will go to project and then i will simply run the bellow command to run laravel application.

cd your_project_folder
php -S localhost:8000 -t public/

Now, we are able to access project with the following URL:

http://localhost:8000
Example 2: Run Laravel App with Different Port

Here, i will go to project and then i will simply run the bellow command to run laravel application with different port.

cd your_project_folder
php -S localhost:9000 -t public/

Now, you are able to access project with following URL:

http://localhost:9000
Example 3: Run Laravel App with Different Host

Here, i will go to project and then i will simply run the bellow command to run laravel application with different host.

cd your_project_folder
php -S  127.0.0.1:9000 -t public/

Now, you are able to access project with following URL:

http://127.0.0.1:9000

Read Also: How To Implement Laravel 9 form validation ?

Thanks for read. I hope it help you. For more you can follow us on facebook

close

You may also like