PHP code example of ricardofontanelli / laravel-fanout-provider

1. Go to this page and download the library: Download ricardofontanelli/laravel-fanout-provider 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/ */

    

ricardofontanelli / laravel-fanout-provider example snippets


    // Laravel 4
    'providers' => array(
        // ...
        'RicardoFontanelli\LaravelFanout\FanoutServiceProvider',
    )

    // Laravel 5.*
    'providers' => [
        // ...
        RicardoFontanelli\LaravelFanout\FanoutServiceProvider::class,
    ]

    // Laravel 4.*
    'aliases' => array(
        // ...
        'Fanout' => 'RicardoFontanelli\LaravelFanout\FanoutFacade',
    )

    // Laravel 5.*
    'aliases' => [
        // ...
        'Fanout' => RicardoFontanelli\LaravelFanout\FanoutFacade::class,
    ]
 
php artisan config:publish ricardofontanelli/laravel-fanout-provider
 
php artisan vendor:publish --provider="RicardoFontanelli\LaravelFanout\FanoutServiceProvider"
 artisan tinker 

// Send a notification
Fanout::publish('test', 'My first realtime message using Fanout.io!!');
 artisan tinker

// Send a notification
Fanout::publish('my-channel', 'My first realtime message using Fanout.io!!');
sh
php composer update
app/config/packages/ricardofontanelli/laravel-fanout-provider/config.php
app/config/fanout.php