Sunday, January 30, 2022

[FIXED] Installing laravel on existing project

Issue

I'm developing a laravel application and my computer die. Now I want to get my project from the repository (Bitbucket + Git) but thanks to the git ignore file, the vendor folder is missing. I can't do a composer install on my project because is not allowed (the directory should be empty). The structure of my project is the same as the laravel installation except that I renamed the public folder.

I found this thread but did not solve my problem.

Integrating existing project by laravel framework?

I wanna know the best practice or way to do this and i don't think that copy and paste the folder of my project to a fresh install of larevel should be the way.

Thanks.


Solution

Go to your www folder

cd /var/www

Git clone your application (not that here the directory must not exist):

git clone https://github.com/antonioribeiro/application

CD into the folder

cd application

Execute composer update (if you are in a development environment)

composer update

Or execute composer install (if you are in a production environment)

composer install

Note that for composer install or composer update, the folder may actually have files and even a vendor folder created, there is not such obstacle.



Answered By - Antonio Carlos Ribeiro

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.