int/lumen-base

Base for microservices Integrando.se
482
Install
composer require int/lumen-base
Latest Version:v0.1.31
License:proprietary
Last Updated:Apr 20, 2018
Links: GitHub  ·  Packagist
Maintainer: renatomorenocz

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;
});

Related Packages

doctrine/dbal

Powerful PHP database abstraction layer (DBAL) with many features for database s...

634,760,849 9,707
laravel/framework

The Laravel Framework.

584,532,650 34,931
laravel/tinker

Powerful REPL for the Laravel framework.

493,838,477 7,443
laravel/serializable-closure

Laravel Serializable Closure provides an easy and secure way to serialize closur...

408,553,772 609
nunomaduro/collision

Cli error handling for console/command-line PHP applications.

387,976,821 4,658