Define Settings-Views inside a package>capsule

Is there a way to configure a settings related view inside a package capsule? I couldn't find something about that one. For example a "registerSettingsViewPath" or a property/method returning an explicit view for the related settings.
2 Replies
_crp87
_crp87OP2y ago
The problem is AppSetting class which has this code:
public function getFormBlocks(): array
{
$directory = resource_path('views/twill/settings/' . $this->getSettingGroup()->getName());
public function getFormBlocks(): array
{
$directory = resource_path('views/twill/settings/' . $this->getSettingGroup()->getName());
means, there is no way to use a settings view from within a package>capsule. @ifox.dev I would suggest to read the path from a separate method like getSettingsDir which can be updated by a static setter for example: useSettingsDir(string $directory) or even better: addSettingsDir(string $directory) So fallback would be to read settings classes from resource path but every package can add its own paths to read additional settings from alternative could be a config to read the path(s) from which can be extended through package service providers
ifox
ifox2y ago
yes, that makes sense thanks for submitting an issue
Want results from more Discord servers?
Add your server