cndrsdrmn/api-format-response

Laravel / Lumen API Format Response

v0.3.2 2020-12-14 12:17 UTC

This package is auto-updated.

Last update: 2024-10-30 01:06:42 UTC


README

Add api-request channel on config/logging.php:

    'channels' => [
        ...
        'api-request' => [
            'driver'    => 'daily',
            'formatter' => Monolog\Formatter\LineFormatter::class,
            'formatter_with' => [
                'format' => "[%datetime%] %channel%.%level_name%: %message% %context%\n",
            ],
            'path'      => storage_path('logs/api-request/api-request.log'),
            'level'     => 'debug',
            'days'      => 14,
        ]
        ...
    ]