<?php namespace Orchestra\Foundation\Bootstrap;

use Illuminate\Contracts\Foundation\Application;

class NotifyIfSafeMode
{
    /**
     * Bootstrap the given application.
     *
     * @param  \Illuminate\Contracts\Foundation\Application  $app
     * @return void
     */
    public function bootstrap(Application $app)
    {
        $app['events']->listen('orchestra.extension: booted', function () use ($app) {
            if ('on' === $app['session']->get('orchestra.safemode')) {
                $app['orchestra.messages']->extend(function ($messages) {
                    $messages->add('info', trans('orchestra/foundation::response.safe-mode'));
                });
            }
        });
    }
}

<?php namespace Orchestra\Foundation\Bootstrap;

use Illuminate\Contracts\Foundation\Application;

class NotifyIfSafeMode
{
    /**
     * Bootstrap the given application.
     *
     * @param  \Illuminate\Contracts\Foundation\Application  $app
     * @return void
     */
    public function bootstrap(Application $app)
    {
        if ($app['orchestra.extension.mode']->check()) {
            $app['orchestra.messages']->extend(function ($messages) {
                $messages->add('info', trans('orchestra/foundation::response.safe-mode'));
            });
        }
    }
}

Update checking safe mode notification.
Update checking safe mode notification.

Signed-off-by: crynobone <e1a543840a942eb68427510a8a483282a7bfeddf@gmail.com>
