Integrandose / int-lumen-base by renatomorenocz

Base for microservices Integrando.se
480
0
1
Package Data
Maintainer Username: renatomorenocz
Package Create Date: 2017-06-07
Package Last Update: 2018-04-20
Language: PHP
License: proprietary
Last Refreshed: 2025-04-22 03:12:26
Package Statistics
Total Downloads: 480
Monthly Downloads: 0
Daily Downloads: 0
Total Stars: 0
Total Watchers: 1
Total Forks: 0
Total Open Issues: 0

Install

composer require int/lumen-base

Alter ./bootstrap/app.php

Enable Facades

from

// $app->withFacades();

to

$app->withFacades();
Alter Exception Handler.

from

$app->singleton(
    Illuminate\Contracts\Debug\ExceptionHandler::class,
    App\Exceptions\Handler::clas
);

to

$app->singleton(
    Illuminate\Contracts\Debug\ExceptionHandler::class,
    \Int\Lumen\Core\Exceptions\Handler::class
);
Add Middleware Accepts Json
$app->middleware([
    \Int\Lumen\Core\Http\Middleware\AcceptsJsonMiddleware::class
]);
Add Transformer Service Provider
$app->register(\Int\Lumen\Core\Providers\TransformerServiceProvider::class);
Add Config to Monolog
$app->configureMonologUsing(function ($monolog) {

    $monolog->pushHandler(new \Monolog\Handler\StreamHandler(storage_path() . '/logs/api.log'));
    $monolog->pushProcessor(new \Monolog\Processor\WebProcessor);

    return $monolog;
});