Publish other modules config file
-
I am wondering, if it is possible to make a module, what can overwrite other modules´ config file. (In other words: by
php artisan module:publish-config MyModule
command I want to publish to a newconfig/asgard/dashboard/config.php
file, replacing the original one.My goal with this, is to make project-depending backend menu structure (or a dynamic menu re-arranger), via a module, using the
custom-sidebar
in the config files.
-
Hello,
You can potentially overwrite any configuration using larave's config class.
Example from the CoreServiceProvider:$this->app->config->set('app.locale', array_keys($availableLocales)[0]);