© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
FilamentF
Filament•3y ago•
5 replies
Mansoor Khan

Not able to user Spatie Livewire Comments with Filament v3

I am trying to load Livewire Comments styles and scripts but i get a warning the scripts are loaded before Alpine.

public function boot(): void
    {
        FilamentView::registerRenderHook(
            'panels::head.end',
            fn (): string => Blade::render('<x-comments::styles />'),
        );

        FilamentView::registerRenderHook(
            'panels::head.end',
            fn (): string => Blade::render('<x-comments::scripts />'),
        );
    }
public function boot(): void
    {
        FilamentView::registerRenderHook(
            'panels::head.end',
            fn (): string => Blade::render('<x-comments::styles />'),
        );

        FilamentView::registerRenderHook(
            'panels::head.end',
            fn (): string => Blade::render('<x-comments::scripts />'),
        );
    }
Solution
Somehow I am able to load the comments component.
Instead of loading the
<x-comments::scripts />
<x-comments::scripts />
which pushes scripts to a stack
@comments-scripts
@comments-scripts
I created a custom component and load script directly without pushing to any stack

but now there is styling conflict with filament forms.css
Jump to solution
Filament banner
FilamentJoin
A powerful open source UI framework for Laravel • Build and ship admin panels & apps fast with Livewire
20,307Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

Spatie/comments-livewire
FilamentFFilament / ❓┊help
15mo ago
Laravel Comments in Filament v3
FilamentFFilament / ❓┊help
3y ago
Filament V3 and Livewire V3 scripts
FilamentFFilament / ❓┊help
3y ago
Filamentv3 form.css conflicts with Spatie Livewire comments editor
FilamentFFilament / ❓┊help
3y ago