Support the ongoing development of Laravel.io →
Configuration Packages
Last updated 1 year ago.
0

I can't answer specifically for workbench. But in a pure composer way, the current recommended way is to have your package act as a plugin that fires off the publication when its installed.

Example: Application A depends upon Package 1, and Package 1 depends upon Package 2. Package 2 has views that need publishing. Package 1 registers itself as a plugin. Package 1 creates a class that responds to the “post-install” and “post-update” script events. That script-responding class executes Artisan::call(‘asset:publish’, ‘—package Cccisd/package2’) to do its work.

Here is additional discussion on the subject of composer executing dependencies' scripts.

0

Sign in to participate in this thread!

Eventy

Your banner here too?

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2024 Laravel.io - All rights reserved.