1

Ijust cloned a laravel project from bitbucket and i'm using nginx server for my local devs. But when i navigate to the url for my project(locally) i get this error.

Please help!

4
  • Did you configure your database and .env file? I mean did you create a database on that machine where you cloned the project. And declared the database name, database user and password in .env file for that project and run migrations? Commented Apr 30, 2017 at 13:26
  • I did not run migrations. but created the database and imported the .sql file. Again the project did not come with a .env file Commented Apr 30, 2017 at 13:46
  • Which db are you using? MySQL or some other? And which OS? Commented Apr 30, 2017 at 13:53
  • did you create the .env file before user EddyTheDove made his answer? Commented Apr 30, 2017 at 15:13

1 Answer 1

1

Create an .env file at the root. The content should be something like this

APP_ENV=local
APP_KEY=
APP_DEBUG=true
APP_LOG_LEVEL=debug
APP_URL=http://localhost

DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=db
DB_USERNAME=root
DB_PASSWORD=mysql

BROADCAST_DRIVER=log
CACHE_DRIVER=file
SESSION_DRIVER=file
QUEUE_DRIVER=sync

REDIS_HOST=127.0.0.1
REDIS_PASSWORD=null
REDIS_PORT=6379

MAIL_DRIVER=smtp
MAIL_HOST=mailtrap.io
MAIL_PORT=2525
MAIL_USERNAME=null
MAIL_PASSWORD=null
MAIL_ENCRYPTION=null

Replace all the database values above. Then run php artisan key:generate to generate your app key.

Sign up to request clarification or add additional context in comments.

2 Comments

The OP already created the .env file and imported the .sql file, please read the comments before answering the question.
The OP has not stated anywhere they created the file, but rather "Again the project did not come with a .env file". Read again before teaching people how to read.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.