'error when trying to run a Laravel project

I am just getting started with Laravel and I wanted to download and run a project from github, but after running the php composer install and php artisan serve commands and going to http://127.0.0.1:8000, it says "500 Server Error". Do you guys have any idea what I should do in order to be able to run it?



Solution 1:[1]

Did you make an env file? You need to make sure your framework is connected to the server. You should have an env.example file to copy from and it should look something like this

DB_CONNECTION=mysql
DB_HOST="db"
DB_PORT=3306
DB_NAME=YOUR DATABASE NAME
DB_USERNAME=YOUR DATABASE USERNAME
DB_PASSWORD=YOUR DATABASE PASSWORD

Save it in your root directory as .env

Solution 2:[2]

First Form .env File Make APP_DEBUG=true.(then you will find error instead of 500) If There is no vendor Folder than in Cmd Write Composer Update. Then try php artisan serve

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Bret Johnson
Solution 2 Harsh vaghasiya