1. Go to this page and download the library: Download expdev07/laravel-logsnag 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/ */
use Illuminate\Support\Facades\Log;
Log::channel('logsnag')->emergency('There is an emergency! Please fix ASAP.');
use ExpDev07\Logsnag\Facades\Logsnag;
Logsnag::log('my-channel',
event: 'New subscriber!',
description: 'Someone just subscribed to MySaaS Pro at $9.99',
icon: '🤑',
notify: true,
);
use ExpDev07\Logsnag\Client\LogsnagClient;
app(LogsnagClient::class)->log(new LogsnagRequest(
project: 'project-name',
channel: 'channel',
event: 'Test event',
description: 'This is a description for test event',
icon: '😊',
notify: true,
));