Django102
Django102

Reputation: 543

How to setup Git Repo for Laravel Project to run after Cloning?

How do you to setup a Git Repo for a Laravel Project to run after cloning from a remote host like Gitlab, Guthub or Bitbucket? After cloning a Laravel repo to a local computer php artisan serve gives this error 'PHP Warning: require(D:\MyGitLab\laravel-project/vendor/autoload.php): failed to open stream: No such file or directory '. This means simply cloning does not work. What is the solution? I added all files and directories to origin repo.

Upvotes: 3

Views: 1531

Answers (3)

Jesus Erwin Suarez
Jesus Erwin Suarez

Reputation: 1585

You need to run

composer update

first to install package dependency and run

php artisan serve

and run

php artisan key:generate

Upvotes: 1

Binod Kafle
Binod Kafle

Reputation: 89

  1. Make a copy of .env.example to .env file.
  2. Make database and link it from .env file.
  3. Run composer update command
  4. Run php artisan key:generate command
  5. Install Bower, NPM or any other front end package if you are using.
  6. Run php artisan migrate command.
  7. Run php artisan serve command.

You are good to go!!!

Upvotes: 4

djangoscholar
djangoscholar

Reputation: 133

run

php artisan key:generate

That should work.

Upvotes: 1

Related Questions