I had severe issues trying to extend the AppSetting class due to the amount of private methods.
For this reason I decided to change all methods from private to protected.
Additionally I refactored the constructor and moved the storage group init in a separate function that can be called when you need to redefine the storage group name.
In my case I had a problem with multitenant Queues (using the library https://github.com/tenancy/multi-tenant).
The group was defined once for queue and all tenant jobs were called using the first defined setting group.
To change the setting group at runtime you can call this function:
app('app-settings')->setStorageGroup('my-storage-group')
I had severe issues trying to extend the
AppSetting
class due to the amount of private methods. For this reason I decided to change all methods from private to protected. Additionally I refactored the constructor and moved the storage group init in a separate function that can be called when you need to redefine the storage group name. In my case I had a problem with multitenant Queues (using the library https://github.com/tenancy/multi-tenant). The group was defined once for queue and all tenant jobs were called using the first defined setting group.To change the setting group at runtime you can call this function:
app('app-settings')->setStorageGroup('my-storage-group')