Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Filament Webpush Laravel Package

andrefelipe18/filament-webpush

View on GitHub
Deep Wiki
Context7

Custom Configuration

This page covers advanced configuration options for Filament Webpush.

Service Worker Customization

The default service worker is designed to handle basic push notification functionality, but you may need to customize it for your specific requirements.

Location

After running the webpush:prepare command, the service worker file is located at:

public/sw.js

WebPush JavaScript

The WebPush JavaScript file that handles subscription and notification display is located at:

resources/js/webpush.js

You can customize this file and include it in your build process.

Advanced Plugin Configuration

The Filament Webpush plugin has several configuration options:

FilamentWebpushPlugin::make()
    ->registerSubscriptionStatsWidget(true) // Show subscription stats widget

Handling Subscription Lifecycle

You can listen for subscription events in your application:

use NotificationChannels\WebPush\Events\NotificationSent;
use NotificationChannels\WebPush\Events\NotificationFailed;
use FilamentWebpush\Events\PushSubscriptionCreated;
use FilamentWebpush\Events\PushSubscriptionDeleted;

protected $listen = [
    NotificationSent::class => [
        YourNotificationSentListener::class,
    ],
    NotificationFailed::class => [
        YourNotificationFailedListener::class,
    ],
    PushSubscriptionCreated::class => [
        YourSubscriptionCreatedListener::class,
    ],
    PushSubscriptionDeleted::class => [
        YourSubscriptionDeletedListener::class,
    ],
];

Additional Configuration Options

Queue Configuration

Since Web Push notifications are queued, you may want to specify the queue they should use:

class NewPostPublished extends Notification implements ShouldQueue
{
    use Queueable;

    public $queue = 'notifications';
    // ...
}
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
oxygen/data
oxygen/core
jengo/base
xiloryx/log-collector
a21ns1g4ts/filament-stripe
la-php/laravel-admin
artisan-build/community-prompts
vleroy/smart
ayles-software/laravel-australian-public-holidays
cboxdk/laravel-id-spatie
cboxdk/laravel-id-billing
cboxdk/laravel-id-billing-bridge
simple-as-fuck/php-performance-log
hsluv/hsluv
seampact/codegen
seampact/hooks
seampact/ir
mehedimi/laravel-amp-mail
happones/laravel-vue-i18n-generator
jwerd/inertia-table