Skip to content

Instantly share code, notes, and snippets.

@jamesmills
Created July 13, 2022 06:42
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jamesmills/248e4320fcde2c22dc863eed255d1f37 to your computer and use it in GitHub Desktop.
Save jamesmills/248e4320fcde2c22dc863eed255d1f37 to your computer and use it in GitHub Desktop.
// Let's say you have a local package which you want to do some develoment on by including it in another project
/Users/jamesmills/Projects/Packages/larapex-charts
// You can use this one-liner to have composer install it from you local file system
composer config repositories.local '{"type": "path", "url": "/Users/jamesmills/Projects/Packages/larapex-charts"}' --file composer.json
// Which will add this to your composer.json file
"repositories": {
"local": {
"type": "path",
"url": "/Users/jamesmills/Projects/Packages/larapex-charts"
}
}
// Now the composer require/update etc will use this path for this package
composer require arielmejiadev/larapex-charts
...
Package operations: 0 installs, 1 update, 0 removals
- Removing arielmejiadev/larapex-charts (4.0.0)
- Installing arielmejiadev/larapex-charts (dev-sparklines): Symlinking from /Users/jamesmills/Projects/Packages/larapex-charts
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment