I have installed laravel by composer create-project laravel/laravel –-prefer-dist
after this run php artisan serve command to laravel project directory and get this result.
Laravel development server started: http://127.0.0.1:8000
But when i go to http://127.0.0.1:8000 in browser laravel project not running and give error
This site can’t be reached 127.0.0.1 refused to connect.
but http://localhost/laravel/public/ it is working. Can anyone tell me that what is proper way to run this laravel project.
If you install PHP Desktop Application, it allows you to run PHP script like a Desktop Application. And so, you don't need any kind of server software like XAMPP. Laravel, as a well established framework has a few different options available for running a development environment and running your application.
First, run your first Laravel project blog as follows: Open your command prompt and go to your drive where your Laravel project exists. Now type http://localhost:8000 in the browser and your blog project will run. Now go to your browser and type http://localhost:8080 in your browser your another project will also run.
Try to run in different port
php artisan serve --port=9000
and then try http://127.0.0.1:9000 will work.
As might be on port 8000 something already running on your system will not make it work.
And you can also run your laravel
project without artisan serve command
If anyone wants to make the application public, the more easy and fastest way is:
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