Looking to hire Laravel developers? Try LaraJobs

laravel-notification-preferences maintained by draganus

Description
Users can: Enable/disable notifications for email address, push notifications, SMS, slack..
Author
Last update
2021/12/10 23:16 (dev-main)
License
Downloads
5

Comments
comments powered by Disqus

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.