When making a Laravel package, how do I register the service provider and alias of dependency packages?

前端 未结 3 1962
死守一世寂寞
死守一世寂寞 2021-01-31 12:26

I\'m creating a package for Laravel and I\'ve defined the Notification package (https://github.com/edvinaskrucas/notification) as a dependency for my package.

In /workbe

3条回答
  •  暖寄归人
    2021-01-31 12:45

    During package development you should add your package service provider in composer.json file as in the code below. For additional information please consult at Laravel's Package Discovery.

    "extra": {
        "laravel": {
            "providers": [
                "Barryvdh\\Debugbar\\ServiceProvider"
            ],
            "aliases": {
                "Debugbar": "Barryvdh\\Debugbar\\Facade"
            }
        }
    },
    

提交回复
热议问题