Skip to content
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

Allow dynamically changing the settings property. #1435

Merged
merged 1 commit into from Feb 3, 2022
Merged

Allow dynamically changing the settings property. #1435

merged 1 commit into from Feb 3, 2022

Conversation

mxm1070
Copy link
Contributor

@mxm1070 mxm1070 commented Feb 2, 2022

This pull request adds the ability to dynamically set the settings property of a settings page:

public static function getSettings(): string
{
    return config('multitenancy.tenant_model')::checkCurrent()
        ? \App\Settings\Tenant\StoreSettings::class
        : \App\Settings\Landlord\StoreSettings::class;
}

in your class the same way you can use the getModel function in the Resource class. This is part of my discussion on multitenancy (#1407).

@danharrin danharrin added the enhancement New feature or request label Feb 3, 2022
@danharrin danharrin merged commit c944a7e into filamentphp:2.x Feb 3, 2022
@danharrin
Copy link
Member

Perfect, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants