PHP code example of alfredlib / aliyunsls-for-laravel

1. Go to this page and download the library: Download alfredlib/aliyunsls-for-laravel 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/ */

    

alfredlib / aliyunsls-for-laravel example snippets


'providers' => [
    // ...
    'Alfredlib\AliyunSls\AliyunSlsServiceProvider::class',
]

'aliases' => [
    // ...
    'Sls' => Alfredlib\AliyunSls\Facades\Sls::class,
]


return [
    'endpoint' => env('ALIYUN_SLS_ENDPOINT', ''),
    'access_key' => env('ALIYUN_SLS_ACCESS_KEY', ''),
    'access_secret' => env('ALIYUN_SLS_ACCESS_SECRET', ''),
    'project' => env('ALIYUN_SLS_PROJECT', ''),
    'default_logstore' => env('','test'),
]


Sls::info();
Sls::warning();
Sls::error();
Sls::debug();


  php artisan vendor:publish --provider="Alfredlib\AliyunSls\AliyunSlsServiceProvider"