牛骨文教育服务平台(让学习变的简单)

发布分类文件

您可能想要分别的发布一些分类的文件。举例,您可能想要您的用户可以分别发布扩展包的配置文件与静态资源文件。您可以使用 tagging 来达成:

// Publish a config file
$this->publishes([
    __DIR__."/../config/package.php" => config_path("package.php")
], "config");

// Publish your migrations
$this->publishes([
    __DIR__."/../database/migrations/" => database_path("/migrations")
], "migrations");

您可以使用这些 tag,来分别发布这些扩展包里的文件。

php artisan vendor:publish --provider="VendorProvidersPackageServiceProvider" --tag="config"