Hi all,
I have a laravel package that requires other packages via composer dependencies (let's say that we have package "A" that requires package "B").
My goal is to change the configuration file contents on "B" package from "A" package's logic. Which is the best way to do this? Store the configuration in the database is not an option.
Thank you in advance.
You can use laravel runtime configuration (Config::set) from your package service provider register() function.
codextends said:
You can use laravel runtime configuration (Config::set) from your package service provider register() function.
Hi codextends, i've tried, but i need the configuration changes permanently. Package "B" is a complex package that reads configurations from different environments like artisan-cli and web runtime.
My options at this time are: (1) - https://github.com/daftspunk/laravel-config-writer (it's not in packagist but i can publish) (2) - Use simply File::put and rewrite the configuration file (this removes all file style and comments) (3) - Use simply File::put and change content with a simple regex (i don't like this)
I think this is a big feature, since allow package interworking.
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community