1

I can install Laravel and get it up and running just fine using the installation process, but what I don't understand is how I'm suppose to be able to push that same source code and be able to run it from a repo, like github. When I do this, cloning it in doesn't allow me to be able to run php artisan anything.

Moreover, when I have a working directory, pushing that up to a repo, cloneing it back down, still doesn't work. I'm unable to run artisan. The only way I can do this is through composer from the install instructions, which would create a new project.

Please guide me; I'm at a loss here.

Alexander Kleinhans
  • 5,950
  • 10
  • 55
  • 111

2 Answers2

2

Its because the vendor directory is not included when you clone.

To solve it run composer install where you cloned it, and then artisan should work.

Blackus
  • 6,883
  • 5
  • 40
  • 51
BenB
  • 2,747
  • 3
  • 29
  • 54
1

If you had checked .gitignore file, you might have already got this.

Because we don't commit dependency into git repository. We have to manually install it via composer install for a fresh copy of a project in any machine. Once you have local copy, you only require to update it or install when any update into composer.lock file.

Blackus
  • 6,883
  • 5
  • 40
  • 51