PHP code example of rainbow2019s / logger

1. Go to this page and download the library: Download rainbow2019s/logger 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/ */

    

rainbow2019s / logger example snippets




use Laravel\Lumen\Routing\Controller;
use Illuminate\Http\Request;
use Rainbow2019s\Logger\Facade\Logger;

class TestController extends Controller
{
    public function test()
    {
        Logger::info('user add',['id'=>1]);
        return 'ok';
    }
}
bootstrap/app.php


  ...
  $app->register(Rainbow2019s\Logger\Providers\LoggerServiceProvider::class);
  ...