03.12.2015 Views

laravel4cookbook

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Packages 167<br />

18 },<br />

19 "minimum-stability" : "dev"<br />

20 }<br />

.<br />

This file should be saved as workbench/formativ/deployment/composer.json.<br />

I’ve added a description, my name and email address. I also cleaned up the formatting a bit; but<br />

that’s not really a requirement. I’ve also set the minimum PHP version to 5.4.0 as we’re using things<br />

like short array syntax in our package.<br />

.<br />

You should also create a readme.md file, which contains installation instructions, usage instructions,<br />

license and contribution information. I can’t understate the import ants of these things — they<br />

are your only hope to attract contributors.<br />

.<br />

You can learn more about the composer.json file at: http://getcomposer.org/doc/01-basic-usage.md#composerjson-project-setup.<br />

Submitting A Package To Packagist<br />

To get others using your packages; you need to submit them to packagist.org. Go to http://packagist.org<br />

and sign in. If you haven’t already got an account, you should create it and link to your GitHub<br />

account.<br />

You’ll find a big “Submit Package” button on the home page. Click it and paste the URL to your<br />

GitHub repository in the text field. Submit the form and you should be good to go.<br />

.<br />

You can learn more about package development at: http://laravel.com/docs/packages.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!