PHP code example of ingoldsby / laravel-dashboard-display-webhook-tile

1. Go to this page and download the library: Download ingoldsby/laravel-dashboard-display-webhook-tile 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/ */

    

ingoldsby / laravel-dashboard-display-webhook-tile example snippets


// in config/dashboard.php

return [
    // ...
    'tiles' => [
        'webhook' => [
            'configurations' => [
                'default' => [
                    'column' => 'headers',
                    'value' => 'x-shopify-topic',
                    'offset' => 0,
                ]
            ],
            'refresh_interval_in_seconds' => 60,
        ]
    ],
];

// in config/dashboard.php

return [
    // ...
    'tiles' => [
        'webhook' => [
            'configurations' => [
                'default' => [
                    'column' => 'headers',
                    'value' => 'x-shopify-topic',
                    'offset' => 0,
                ],
                'payload' => [
                    'column' => 'payload',
                    'value' => 'id',
                ],
            ],
            'refresh_interval_in_seconds' => 60,
        ]
    ],
];

// in app/console/Kernel.php

protected function schedule(Schedule $schedule)
{
    // ...
    $schedule->command(\Ingoldsby\DisplayWebhookTile\Commands\FetchDisplayWebhookCommand::class)->everyMinute();
}

// in app/console/Kernel.php

protected function schedule(Schedule $schedule)
{
    // ...
    $schedule->command(\Ingoldsby\DisplayWebhookTile\Commands\FetchDisplayWebhookCommand::class, ['alternate-configuration-name'])->everyMinute();
}