I have multiple laravel 8 projects with some common logic. For these logics, I am currently creating a package, so that I can use it in all projects and don't have to make changes multiple times.
In all these projects, I am using spatie/laravel-feed package, which has a config file feed.php to customize the paths/routes. Is there a way to create a centralized config file feed.php inside the package? So the hierarchy of config merging should be:
- vendor/spatie/laravel-feed/config/feed.php
- vendor/my-package/-my-package/config/feed.php
- config/feed.php
Using the following in the my-package ServiceProvider::register method doesn't work:
$this->mergeConfigFrom(
__DIR__.'/../../config/feed.php', 'feed',
);