-
-
Notifications
You must be signed in to change notification settings - Fork 106
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hierarchy on setting #6
Comments
There's a Cast for the Spatie data-transfer-object package: https://github.com/spatie/laravel-settings/blob/master/src/SettingsCasts/DtoCast.php You could create a DTO like this: class PostData extends DataTransferObject
{
public string $title;
public string $body;
} And create a settings class like this: class GeneralSettings extends Settings
{
public PostData $post_data;
public static function group(): string
{
return 'general';
}
} Normally the DTO cast is globally registered so, that's it! Otherwise you have to check your configuration file. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi,
Thanks for great library.
Is it possible to define hierarchy on setting's group or property?
The text was updated successfully, but these errors were encountered: