m1guelpf/deploying-mode

This package is abandoned and no longer maintained. The author suggests using the laravel/framework package instead.

Clone of Laravel's manteniance mode, but for deploying

v2.0 2017-09-05 12:00 UTC

This package is not auto-updated.

Last update: 2017-09-05 12:01:04 UTC


README

Latest Version on Packagist Software License Total Downloads

This package is no longer mantained. You can use Laravel's native Manteniance Mode as a replacement.

Installation

You can install the package via composer:

composer require m1guelpf/deploying-mode

Next, you must install the service provider:

// config/app.php
'providers' => [
    ...
    M1guelpf\DeployingMode\DeployingModeServiceProvider::class,
];

Finally, you'll have to add the middleware to the top of the $middleware array in the Kernel.php file:

// app/Http/Kernel.php
protected $middleware = [
          \M1guelpf\DeployingMode\CheckForDeployingMode::class,
          \Illuminate\Foundation\Http\Middleware\CheckForMaintenanceMode::class,
        ];

Usage

You can check wether the application is in deploying mode by calling:

$deployingUtils = new M1guelpf\DeployingMode\Utils();
echo $deployingUtils->isDeploying();

You can also access some custom variables on the exception:

echo $exception->commit; // The commit specified in the deploying command
echo $exception->prettyCommit; // Commit trimmed to 7 characters
echo $exception->wentDownAgo; // The time the app was put in deploying mode in "XX ago" format

Changelog

Please see CHANGELOG for more information what has changed recently.

Contributing

Please see CONTRIBUTING for details.

Security

If you discover any security related issues, please email soy@miguelpiedrafita.com instead of using the issue tracker.

Credits

License

This package is licensed under the Mozilla Public license. Please see License File for more information.