2017 © Pedro Peláez
 

library lumen-maintaince

Support for maintaince mode in Lumen

image

mingalevme/lumen-maintaince

Support for maintaince mode in Lumen

  • Wednesday, October 4, 2017
  • by mingalevme
  • Repository
  • 1 Watchers
  • 0 Stars
  • 3 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

lumen-maintaince

Provides support for maintaince mode for Lumen Framework., (*1)

Installation

  1. composer require mingalevme/lumen-maintaince.
  2. Register the service provider Mingalevme\Lumen\Maintaince\MaintainceServiceProvider.
  3. Replace Lumen Application class with one of the following: 3.1. You can directly use class Mingalevme\Lumen\Maintaince\Application in you /bootstrap/app.php instead of Laravel\Lumen\Application:
<?php // /bootsrap/app.php

// ...

/*
|--------------------------------------------------------------------------
| Create The Application
|--------------------------------------------------------------------------
|
| Here we will load the environment and create the application instance
| that serves as the central piece of this framework. We'll use this
| application as an "IoC" container and router for this framework.
|
*/

$app = new Mingalevme\Lumen\Maintaince\Application(
    realpath(__DIR__.'/../')
);

// ...

3.2. OR you can use the trait Mingalevme\Lumen\Maintaince\Maintaince for your own Application class:, (*2)

<?php // /app/Helpers/Laravel/Lumen/Application.php

namespace App\Helpers\Laravel\Lumen;

use Mingalevme\Lumen\Maintaince\Maintaince;

class Application extends \Laravel\Lumen\Application
{
    use Maintaince;
}

<?php // /bootsrap/app.php

// ...

/*
|--------------------------------------------------------------------------
| Create The Application
|--------------------------------------------------------------------------
|
| Here we will load the environment and create the application instance
| that serves as the central piece of this framework. We'll use this
| application as an "IoC" container and router for this framework.
|
*/

$app = new App\Helpers\Laravel\Lumen\Application(
    realpath(__DIR__.'/../')
);

// ...

  1. Now you are able to use artisan down and artisan up commands:
$ php artisan list
# ...
Available commands:
    # ...
    down                Put the application into maintenance mode
    up                  Bring the application out of maintenance mode
    # ...
# ...
$ php artisan down
Application is now in maintenance mode.
$ php artisan up
Application is now live.

The Versions

04/10 2017

dev-master

9999999-dev https://github.com/mingalevme/lumen-maintaince

Support for maintaince mode in Lumen

  Sources   Download

Apache License 2.0

The Requires

  • php >=5.4.0

 

laravel lumen maintaince