dev-master
9999999-dev https://github.com/mingalevme/lumen-maintainceSupport for maintaince mode in Lumen
Apache License 2.0
The Requires
- php >=5.4.0
laravel lumen maintaince
Wallogit.com
2017 © Pedro Peláez
Support for maintaince mode in Lumen
Provides support for maintaince mode for Lumen Framework., (*1)
composer require mingalevme/lumen-maintaince.Mingalevme\Lumen\Maintaince\MaintainceServiceProvider.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__.'/../')
);
// ...
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.
Support for maintaince mode in Lumen
Apache License 2.0
laravel lumen maintaince