PHP code example of edsonjorgef1 / laravel-teams-logging

1. Go to this page and download the library: Download edsonjorgef1/laravel-teams-logging 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/ */

    

edsonjorgef1 / laravel-teams-logging example snippets


Edsonjorgef1\LaravelTeamsLogging\LoggerServiceProvider::class

$app->register(Edsonjorgef1\LaravelTeamsLogging\LoggerServiceProvider::class);

$app->configure('teams');

'teams' => [
    'driver'    => 'custom',
    'via'       => \Edsonjorgef1\LaravelTeamsLogging\LoggerChannel::class,
    'level'     => 'debug',
    'url'       => env('INCOMING_WEBHOOK_URL'),
    'style'     => 'simple',    // Available style is 'simple' and 'card', default is 'simple'
],

'teams' => [
    'driver'    => 'custom',
    'via'       => \Edsonjorgef1\LaravelTeamsLogging\LoggerChannel::class,
    'level'     => 'debug',
    'url'       => env('INCOMING_WEBHOOK_URL'),
    'style'     => 'simple',    // Available style is 'simple' and 'card', default is 'simple'
    'name'      => 'Dummy Project'
],

Log::channel('teams')->error('Error message');

Log::channel('teams')->error('Error message', 
    [
        'name'  => 'Assigned to',
        'value' => 'Unassigned',
    ]);

'channels' => [
    'stack' => [
        'driver' => 'stack',
        'channels' => ['single', 'teams'],
    ],
],
bash
$ php artisan vendor:publish --provider="Edsonjorgef1\LaravelTeamsLogging\LoggerServiceProvider"