Skip to content

Conversation

@aldesrahim
Copy link

@aldesrahim aldesrahim commented Oct 12, 2025

It enables configuration files and other publishable assets from external composer dependencies to be published directly into a specific module.

This makes it easier to configure third-party packages used by individual modules without affecting the global application scope.

Example
When installing lucasdotvin/laravel-soulbscription, we might want to publish its migration and configuration files inside the Billing module.

php artisan vendor:publish --tag=soulbscription-config
php artisan vendor:publish --tag=soulbscription-migrations

However, the published configuration file is not automatically loaded.
To load it, we can manually merge the configuration in BillingServiceProvider:

public function register(): void
{
    $this->mergeConfigFrom(
         __DIR__ . '/../../config/soulbscription.php',
         'soulbscription'
    );
}

This change simplifies that workflow by integrating vendor:publish behavior directly with the module system.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant