Reputation: 502
Lets say I'm building a laravel package, which has hierarchy like this:
PackageContainerClass > *PackageClass* > SomePackageClassMethod()
I want to make PackageClass
swappable by a class from main App
.
I know I could create a publishable config/package_config.php
where the user could override PackageClass
location and then use it for creating PackageClass
object in the package. But I have quite a few classes to be 'swapped', and dont really feel that its the right approach. What's the best approach for this, is there any Laravel magic I dont know about?
Upvotes: 0
Views: 294