PHP code example of john-wink / jw-notifications

1. Go to this page and download the library: Download john-wink/jw-notifications 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/ */

    

john-wink / jw-notifications example snippets


return [
    'table'      => 'subscribed_channels',
    'notifiable' => App\Models\User::class,
];

    use \JohnWink\JwNotifications\Traits\HasCustomizedChannels;

    use \JohnWink\JwNotifications\Traits\CanSubscribeToChannels;

return $panel->plugins([
    JwNotificationsPlugin::make()
        ->notifications([
            /*
            * Add here your Notifications Channels
            * The Notification Channel should use the Trait: 
            * \JohnWink\JwNotifications\Traits\HasCustomizedChannels
            */
        ])
        ->channels(fn () => [
            'database'        => 'Database',
            'mail'            => 'Email',
        ]),
    ]);
bash
php artisan vendor:publish --tag="jw-notifications-migrations"
php artisan migrate
bash
php artisan vendor:publish --tag="jw-notifications-config"
bash
php artisan vendor:publish --tag="jw-notifications-views"