PHP code example of draganus / laravel-notification-preferences

1. Go to this page and download the library: Download draganus/laravel-notification-preferences library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

draganus / laravel-notification-preferences example snippets


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

public function via($notifiable) 
{
    $notificationPreference = new NotificationPreference();
    return $notificationPreference->check($notifiable, self::class);
}
bash
php artisan vendor:publish --provider="draganus\LaravelNotificationPreferences\LaravelNotificationPreferencesServiceProvider"
php artisan migrate