How to customize the composer package and how to use the customized package in the laravel framework?

WBOY
Release: 2016-07-06 13:51:59
Original
1104 people have browsed it

How to customize the composer package and how to use the customized package in the laravel framework?

Reply content:

How to customize the composer package and how to use the customized package in the laravel framework?

There are actually several issues to solve.
Is your custom package public or private? Public ones can be sent directly to packagist, and private ones can be configured with a warehouse as @ginnerpeace said , just point the URL to the warehouse address.

Give me an example:

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

Configure the package you want in composer.json, update it through composer update, and then load the autoloader of composer to use the required package.

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

You can use your own git address directly, so you need to configure a warehouse in composer.json, the type is vcs.
The prerequisite is that your git project has a json file that conforms to composer specifications. I will tell you this. You are left to google it yourself. Don’t write code like a beggar

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template