Support the ongoing development of Laravel.io →
Configuration Packages Architecture
Last updated 8 months ago.
0

You can use laravel runtime configuration (Config::set) from your package service provider register() function.

Last updated 8 months ago.
0

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.

Last updated 8 months ago.
0

Sign in to participate in this thread!

Cloudways

Your banner here too?

shaggyz shaggyz Joined 22 May 2014

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2023 Laravel.io - All rights reserved.