1. Go to this page and download the library: Download elainekoo/laravel-sls 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/ */
Log::info('Test Message', ['foobar'=>'2003']);
//or you can use `app('sls')`
app('sls')->putLogs([
'type' => 'test',
'message' => json_encode(['This should use json_encode'])
]);
//or you can use `SLSLog` directly
SLSLog::putLogs([
'type' => 'test',
'message' => json_encode(['This should use json_encode'])
]);
sh
php artisan vendor:publish --provider="Lokielse\LaravelSLS\LaravelSLSServiceProvider"
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.