DEV Community

Cover image for Error Laravel after clone/download from GitHub/GitLab or any (Solution)
Osman Forhad
Osman Forhad

Posted on

Error Laravel after clone/download from GitHub/GitLab or any (Solution)

I was working on a Laravel project which I was starting from my office, and it’s is in the GitHub repository uploaded by me. After arriving at my home I need to work on that project. So, I clone it and trying to run the project. In just at this point it shows me a Warning and a Fatal error on the browser.
The Warning and Fatal error like:
Alt Text

In that case I am trying to solve this error and run this project smoothly.
So, I am trying this procedure and finally achive my goal.
The 3 step I have done is:
1st Step: clone Laravel app from my git repo. Try to run this project.
The Displayed error is:
Alt Text

2nd Step: Go to the application directory using cd run composer install on my terminal, then I reload my browser tab again. Now it shows me another error which is like:

Alt Text
Then I was run the copy .env.example .env command on my terminal.
Note: this command copy a .env file, from, .env.example file, for my project.
Then I fill there (.env file) all necessary credentials.

Then I reload my browser tab again. Now it shows me another Scenario which is like:
Alt Text

3rd Step: Now I was run PHP artisan key: generate command on my terminal.
Then I reload my browser tab. Now it’s working nicely.
.
that's it.
.
Happy Coding.
osman forhad
Mobile & Web Application Developer💻

Top comments (1)

Collapse
 
yano1978 profile image
ernesto ianuario • Edited

I had a similar issue working with Orbstack and ddev laravel, so in my case steps were these here below, I will leave this as reference, I hope it can help:

  1. ddev composer install
  2. copy .env.example and leave it as .env (same as you)
  3. ddev ssh & php artisan key:generate