Skip to content

Users can: Enable/disable notifications for email address, push notifications, SMS, slack ..

License

Notifications You must be signed in to change notification settings

DraganUS/laravel-notification-preferences

Repository files navigation

Users can: Enable/disable notifications for email address, push notifications, SMS, slack..

Latest Version on Packagist GitHub Code Style Action Status Total Downloads


Support me

You can bye me a coffee ☕️.

Installation

You can install the package via composer:

composer require draganus/laravel-notification-preferences

You can publish and run the migrations with:

php artisan vendor:publish --provider="draganus\LaravelNotificationPreferences\LaravelNotificationPreferencesServiceProvider"
php artisan migrate

This is the contents of the published config file:

return [
    /*
     * Set the defoult notification's delivery channels
     */
    "notify_channels" => ['mail', 'database']
];

Usage

in your Notification class replace via method

public function via($notifiable) 
{
    $notificationPreference = new NotificationPreference();
    return $notificationPreference->check($notifiable, self::class);
}

Testing

composer test

Changelog

Please see CHANGELOG for more information on what has changed recently.

Contributing

Please see CONTRIBUTING for details.

Security Vulnerabilities

Please review our security policy on how to report security vulnerabilities.

Credits

License

The MIT License (MIT). Please see License File for more information.

About

Users can: Enable/disable notifications for email address, push notifications, SMS, slack ..

Resources

License

Security policy

Stars

Watchers

Forks

Sponsor this project

Packages

No packages published

Languages