© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
FilamentF
Filament•3y ago•
3 replies
Raj Siva-Rajah

Extra request when notifications are triggered using $wire vs javascript

Does anyone know why notifications sent using a $wire method:

    public function successMessage(): void
    {
        Notification::make()
            ->title('Operation Successful')
            ->success()
            ->send();
    }
    public function successMessage(): void
    {
        Notification::make()
            ->title('Operation Successful')
            ->success()
            ->send();
    }


make 1 more backend request compared to notifications triggered via js:

   triggerNotification: function() {
      new window.FilamentNotification()
         .title('Operation Successful')
         .success()
         .send();
   }
   triggerNotification: function() {
      new window.FilamentNotification()
         .title('Operation Successful')
         .success()
         .send();
   }


?

If I use <button @click="triggerNotification()"> there are only 2 requests. One when the button is clicked, one when the toast disappears.

But if use <button @click="$wire.successMessage()" then 2 requests are made in quick succession when the button is clicked. Meaning a total of 3 requests.

Just trying to figure out how things are working under the hood
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

Notifications - wire to tenancy
FilamentFFilament / ❓┊help
3y ago
Notifications works when triggered on mount() but not when triggered on submit()?
FilamentFFilament / ❓┊help
3y ago
Filament Notifications and `wire:navigate`
FilamentFFilament / ❓┊help
16mo ago
Notifications when using lighttpd
FilamentFFilament / ❓┊help
14mo ago