New

Just launched: Vueblocks, a brand-new search engine for Vue packages! Explore Vueblocks →

cndrsdrmn/api-format-response

Laravel / Lumen API Format Response
145
Install
composer require cndrsdrmn/api-format-response
Latest Version:v0.3.2
PHP:^7.2|^8
Laravel:6 · 7 · 8
Older releases:5
License:MIT
Last Updated:Feb 1, 2023
Links: GitHub  ·  Packagist
Maintainer: cndrsdrmn

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

Related Packages

bwt-team/laravel-api

Package helping with API development

11,339 1
noitran/lumen-form-requests

Missing form requests functionality for lumen, ported from laravel framework.

4,750 5
nebo15/lumen.rest

Components for fast building REST API for Lumen

3,759 1
ngabor84/lumen-api-query-parser

A query parser for REST-APIs based on laravel's lumen framework

1,485 3
nextdots/api-exceptions

JSON exceptions for your API

385 0

Version History

Version Released PHP Laravel License
v0.3.2 ^7.2|^8 ^6.7|^7|^8 MIT
v0.3.1 ^7.2|^8 ^6.7|^7|^8 MIT
v0.3.0 ^7.2|^8 ^6.7|^7|^8 MIT
v0.1.1 ^7.2 ^6.7 MIT
v0.1.0 ^7.1.3 ^5.8 MIT