0

I'm writing an app using Laravel 4.2. This time, I needed some extra functionality and I decided to create a package. I used the workbench functionality as described in Laravel's docs.

Currently (and locally), the package is very small but it suits my app very well. I don't think this should be published to the community because it is still very green. I'll put a few hours into it when I finish with my app but I can't right now.

Now, I know the workbench/ directory is not to be pushed to production. Then, how do I use my package on production?

So far, I heard I have to push the package to GitHub (which I already did), and then publish it on Packagist. But I feel that publishing the script as is won't be helpful to others and might as well harm those in search of this functionality (like me a few days ago) on this so under developed package.

Is there a way to add my package to my app's composer.json and have it installed without publishing it to the community while it's under development?

4

1 回答 1

1

您正在寻找的是“私人存储库”。在您的 composer.json 文件中,您可以定义一个对象repositories,您可以在其中定义其他位置来搜索此存储库

详细解释可以在Autoload bitbucket repository找到。同样的原则也适用于 github。

于 2015-02-25T17:35:46.360 回答