How do I customize the composer package, and how do I use the custom package in the Laravel framework?

Source: Internet
Author: User
How do I customize the composer package, and how do I use the custom package in the Laravel framework?

Reply content:

How do I customize the composer package, and how do I use the custom package in the Laravel framework?

This actually has several problems to solve.
Is your custom package public or private? Public can be sent directly to the packagist, private can be like @ginnerpeace said, configure a warehouse, URL to the warehouse address on the line.

Let's give an example:

{    "repositories": [        {            "type": "vcs",            "url": "你的包的git地址(本地和远程都行)"        }    ],    "require": {        "你的包名": "dev-master"    },}

In the configuration of the composer.json package you want, by composer update updating, reloading composer The autoloader, you will be able to use the required package.

Custom packages need to be created in https://packagist.org/, see https://segmentfault.com/a/1190000004294540

You can use your git address directly, so you need to configure a repository in Composer.json, which is the VCs type.
The prerequisite is that you have this GIT project in accordance with the composer specification of the JSON file, tell you this, the rest of Google, write code not the same as beggars

  • Related Article

    Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.