cndrsdrmn / api-format-response by cndrsdrmn

Laravel / Lumen API Format Response
56
0
1
Package Data
Maintainer Username: cndrsdrmn
Maintainer Contact: cndrsdrmn@gmail.com (cndrsdrmn)
Package Create Date: 2019-12-05
Package Last Update: 2023-02-01
Language: PHP
License: MIT
Last Refreshed: 2024-11-23 03:20:10
Package Statistics
Total Downloads: 56
Monthly Downloads: 0
Daily Downloads: 0
Total Stars: 0
Total Watchers: 1
Total Forks: 0
Total Open Issues: 1

Laravel / Lumen API Format Response

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,
        ]
        ...
    ]