antonioribeiro / health

Laravel Health Panel
BSD 3-Clause "New" or "Revised" License
1.95k stars 196 forks source link

Lumen #116

Closed nope7777 closed 6 years ago

nope7777 commented 6 years ago

Hi, i'm using your package with Lumen and made some changes to make it work. Will be great if you'l marge it.

Main problems was:

  1. Lumen Kernel class don't have command method. I didn't found any similar methods, so i made separate classes for commands.
  2. Lumen router don't have middleware method.

Also i removed info() functions calls, they spam "yes" message to the log.

I checked changes with both Laravel and Lumen, all seams to be working fine.

Also for Lumen users, some code must be added to bootstrap/app.php:

$app->instance('path.config', app()->basePath() . DIRECTORY_SEPARATOR . 'config');
$app->instance('path.storage', app()->basePath() . DIRECTORY_SEPARATOR . 'storage');

$app->withFacades();

$app->singleton('Illuminate\Contracts\Routing\ResponseFactory', function ($app) {
    return new \Illuminate\Routing\ResponseFactory(
        $app['Illuminate\Contracts\View\Factory'],
        $app['Illuminate\Routing\Redirector']
    );
});

$app->register(PragmaRX\Health\ServiceProvider::class);

And thx for a great package.

antonioribeiro commented 6 years ago

Thank you!