In Laravel 5.4,
After running php artisan serve command fresh laravel setup works on this url localhost:8000
but when i try to access with public url localhost/lara54/public
. it is not working and gives white blank page. I tried this using virtual host in linux giving folder path upto public but still not working.
php artisan serve command also creates a virtual host what i am missing here to make this setup work with URL.
Reasons why php artisan serve not workingYou are running php artisan serve command in wrong directory. php artisan serve is laravel command only work with laravel project. Check project directory and run in root directory of your project. The requested host or port is not available.
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.
Run this command it will work
php -S 0.0.0.0:8000
give permission to following two directories:
storage
bootstrap/cache
i hope its help you
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