开发Laravel软件包时需要在require块中放什么?

时间:2019-05-16 02:33:06

标签: laravel

我正在学习如何开发laravel软件包,现在我要将其上传到packagist以便通过作曲家使用它:

我当前的composer.json文件:

{
    "name": "Kadd3/laravel-package-test",
    "description": "laravel package test.",
    "license": "MIT",
    "authors": [
        {
            "name": "test test",
            "email": "test@gmail.com"
        }
    ],
    "require": {},
    "require-dev": {
        "orchestra/testbench": "^3.8"
    },
    "autoload": {
        "psr-4": {
            "Kadd3\\Events\\": "src/"
        },
        "files": [
            "src/Helpers/helpers.php"
        ]
    },
    "autoload-dev": {
        "psr-4": {
            "Kadd3\\Events\\Tests\\": "tests/"
        }
    },
    "extra": {
        "laravel": {
            "providers": [
                "Kadd3\\Events\\Providers\\EventsServiceProvider"
            ]
        }
    }
}

您可以看到require块为空:

我应该放在那儿?还是应该留空?

0 个答案:

没有答案