PHP code example of saasscaleup / laravel-console-log
1. Go to this page and download the library: Download saasscaleup/laravel-console-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/ */
saasscaleup / laravel-console-log example snippets
use Saasscaleup\LCL\Facades\LCLFacade;
public function myFunction()
{
LCLFacade::notify('Invoke stream log via Facade 1');
// Some code here
LCLFacade::notify('Invoke stream log via Facade 2');
// Some code here
LCLFacade::notify('Invoke stream log via Facade 3');
// or via helper
stream_log('Invoke stream log via helper 1');
stream_log('Invoke stream log via helper 2');
stream_log('Invoke stream log via helper 3');
// or using your application
\Log::info('Invoke stream log via application log 1');
\Log::error('Invoke stream log via application log 2');
\Log::debug('Invoke stream log via application log 3');
}
use Saasscaleup\LCL\Facades\LCLFacade;
public function myMethod()
{
LCLFacade::notify('User purchase plan - step 1', 'info', 'UserPurchase');
// or via helper
stream_console_log('User purchase plan - step 1', 'info', 'UserPurchase');
}