PHP code example of gboquizosanchez / google-chat-channel

1. Go to this page and download the library: Download gboquizosanchez/google-chat-channel 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/ */

    

gboquizosanchez / google-chat-channel example snippets


'channels' => [
    'google-chat' => [
        'driver' => 'custom',
        'via'    => \Boquizo\GoogleChatChannel\GoogleChatLogger::class,
    ],

    'stack' => [
        'driver'   => 'stack',
        'channels' => ['single', 'google-chat'],
    ],
],

// Sent to Google Chat (at or above your configured level)
Log::error('Payment failed', ['order_id' => 1234]);
Log::critical('Database connection lost');

// Not sent if GOOGLE_CHAT_LOG_LEVEL=error
Log::info('User logged in');