John Doe John Doe - 4 months ago 69
PHP Question

Whoops, looks like something went wrong

Before we get into this please, I can't stress this enough I don't know ANYTHING about Laravel so any help is very much appreciated and I'm always interested in learning.

Currently I am getting an issue that says this when I go to my website.


Whoops, looks like something went wrong.


The issue has happened since I installed Laravel onto my server, through looking up some things I have learned that I am missing a file called
.env
please note that I am not familiar with WHAT this files does either all I know is that within my application it is in fact missing.

I seen some videos (here) which explain a little about
.env
how ever he pulls up a console in this video which I also don't know how to do.

So all around, I'm just in a giant mess trying to understand this platform, any help relating to my issue would be incredible or even a page where I can learn how to solve issues like this for future reference.

After looking over the wikipedia page it has no direct reference to how to solve these types of issues, so I of course got lost.

Answer

If you've uploaded your project to your server through git then there'll be a .env.example file or if through ftp then both .env and .env.example.

  1. Rename the .env.example file to .env if there is not any already
  2. In your .env file update these variables

    APP_ENV=production
    APP_KEY=some_gibberish_here
    
  3. Save the .env file and reload your server.
  4. If you've uploaded your project through git then run this command in your project folder via ssh session composer install

Hopefully this would fix your issue