Ad

Laravel 5 Package Development GIT Setup

- 1 answer

I have some great code I want to share....so I am moving code from my laravel 5 app into individual packages for use through composer/packagist.

This will also allow me to separate out code I only want in development and avoid deployment of nasty database modification classes to production.

I am confused on setting up git. My main project is running on a git repository. I am developing the packages under a sub-folder named packages/myname/package_name1/ . Each package is going to want its own git repository.

Should I add the folder "packages" to my .gitignore file for my main repository, then set up a git repository for each subfolder?

I followed this tutorial: Setup Laravel 5 Package

Ad

Answer

If you're using composer/packagist then yes, you should add the folder packages to .gitignore on your main repository. When deploying the entire application or when updating a package you'll have to do a composer install/update to keep everything up to date.

Ad
source: stackoverflow.com
Ad