PHP code example of ahmyi / cakephp_discord_log

1. Go to this page and download the library: Download ahmyi/cakephp_discord_log 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/ */

    

ahmyi / cakephp_discord_log example snippets


    'Log' => [
        'debug' => [
            'className' => 'Ahmyi\DiscordLog\Log\Engine\DiscordLog',
            'path' => LOGS,
            'file' => 'debug',
            'url' => env('LOG_DEBUG_URL', null),
            'scopes' => false,
            'webhook' => WEBHOOK_URL
        ],
        'error' => [
            'className' => 'Ahmyi\DiscordLog\Log\Engine\DiscordLog',
            'path' => LOGS,
            'file' => 'error',
            'url' => env('LOG_ERROR_URL', null),
            'scopes' => false,
            'levels' => [ 'error', 'critical', 'alert', 'emergency'],
            'webhook' => WEBHOOK_URL
        ]
    ],