jrbarros/laravel-plug-and-play 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

jrbarros/laravel-plug-and-play

Composer 安装命令:

composer require jrbarros/laravel-plug-and-play

包简介

Plug and play packages in Laravel

README 文档

README

Add to the Laravel application the ability to plug and play packages that are build with package discover without necessarily installing a new dependency on composer.json.

This package uses the great plugin Composer Merge Plugin which allows you to merge multiple composer.json files into the Composer runtime.

Installation

Laravel Plug and Play requires Composer 1.0.0 or newer.

composer require edersoares/laravel-plug-and-play

php artisan package:install

Usage

The composer.json file needs to be updated to something like:

{
    "require": {
        "edersoares/laravel-plug-and-play": "^1.0"
    },
    "extra": {
        "merge-plugin": {
            "include": [
                "packages/*/*/composer.json"
            ]
        }
    }
}

This package is a Composer Merge Plugin extension and its features can be used usually. See more in plugin configuration.

Adding a package

Move or clone the package to packages/<vendor>/<name> folder and runs:

composer update --lock 

Whenever package dependencies are updated, this command must be executed.

This will instruct Composer to recalculate the file hash for the top-level composer.json thus triggering composer-merge-plugin to look for the sub-level configuration files and update your dependencies.

https://github.com/wikimedia/composer-merge-plugin#updating-sub-levels-composerjson-files

Creating a package

To create a package execute:

php artisan package:create <vendor>/<name>

This will create a package in packages folder:

packages
\_ <vendor>
  \_ <name>
    \_ src
      \_ Providers
        \_ ServiceProvider.php
    \_ composer.json

See the official documentation about package discover.

Removing a package

Just only remove the package folder and runs:

composer update --lock 

License

Laravel Plug and Play is licensed under the MIT license. See the license file for more details.

统计信息

  • 总下载量: 3
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 1
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2020-12-22

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固