0

I used Laravel in Visual Studio code, and when I opened localhost:http://127.0.0.1:8000/ bypassing command php artisan serve, I got an error.

So I used another command php -S localhost:8888 -t public, I used this 8888 localhost. But I can't understand why localhost:http://127.0.0.1:8000 is not working.

This is an image of a browser:

this is image of browser

enter image description here

vishal
  • 81
  • 1
  • 2
  • 13
  • what is your error when you use php artisan serve ? – Saromase Jul 27 '20 at 11:06
  • I upload image below question – vishal Jul 27 '20 at 11:09
  • another solution is here https://stackoverflow.com/questions/49574906/php-unknown-failed-opening-required-on-line-0-laravel-5-6 please try this to solve – parmar bhakti Jul 27 '20 at 11:31
  • Whatever command you use in Visual Studio to run your localhost:8000 probably doesn't use `public` as the document root – brombeer Jul 27 '20 at 11:41
  • why?can't use public – vishal Jul 27 '20 at 12:25
  • Do not use Xampp (denwer, mamp, and etc.) in 2020. https://laravel.com/docs/7.x/homestead – zlodes Jul 27 '20 at 12:39
  • 1
    check if your server.php file is present in the given location as mentioned in the warning – bhucho Jul 27 '20 at 13:01
  • 1
    Re-check your `.env` file has the correct parameters . Also the check if you have already run a laravel project instance in the same port . Also try to clear your browser history and then try to run `php artisan serve` or `php -S localhost:8000 -t public` . – Kaviranga Jul 27 '20 at 13:42

1 Answers1

0

you need to go at your laravel project path and run cmd after that run this command.

Another solution is here php - Unknown: Failed opening required on line 0. laravel 5.6