Skip to content
Discussion options

You must be logged in to vote

I think you could do this in the AppServiceProvider

public function boot(): void
{
    FilamentView::registerRenderHook(
        'panels::scripts.after',
        fn (): string => Blade::render('
        <script>
            if(localStorage.getItem(\'theme\') === null) {
                localStorage.setItem(\'theme\', \'dark\')
            }
        </script>'),
    );
}

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@gotzsys
Comment options

@leandrocfe
Comment options

Answer selected by gotzsys
@gotzsys
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help
Labels
None yet
2 participants