I’ll take a stab since nobody else has. I think everything would be fine as long as all your name spacing and package discovery is in order. You might run into problems, or just need extra configuration if you’re going to allow the livewire components to be published.
But I could be wrong, this is just an educated guess. I have a basic understanding of packages and laravel specific packages, but I’ve never actually done one myself.
Hi @xxdalexx, thanks for taking the time to respond. I have gotten almost everything figured out, with exception of the detection of Livewire Component classes due to the
class_namespace config setting being set to the main app namespace (which shouldn’t be changed). For now I am working around this by publishing the component classes to the main app, but preferably this wouldn’t be necessary.
@calebporzio would it be possible to add multiple namespaces to the configuration setting, so that the Livewire classes could live inside my package, and not interfere with the developer’s Livewire classes in the main app?
Hey @mikebronner, you can register components in a service provider like so:
Does that solve your problem?
Thanks @calebporzio, I’ll give that a shot and report back.
Update: worked like a treat! brilliant.