diff --git a/README.md b/README.md index 62abfe1..48b858a 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ ## Install on Laravel ``` -composer req ldc/web-admin-secure-laravel:1.0.0 +composer req ldc/web-admin-secure-laravel:1.0.1 ``` .env.example : @@ -26,3 +26,4 @@ Put 'admin-secure' middleware on route to protect it. Nothing to do command is already configureed to run everyday. You just need to install this package. +**!! Runs only in production !!** diff --git a/changelog.md b/changelog.md index deac330..c23f50e 100644 --- a/changelog.md +++ b/changelog.md @@ -1,4 +1,6 @@ # Changelog - +## **Version 1.0.1** + *Changed* + - Run scheduled only on production envirronement ## **Version 1.0.0** ### Initial release diff --git a/src/AdminSecureServiceProvider.php b/src/AdminSecureServiceProvider.php index f776674..9d6c7ec 100644 --- a/src/AdminSecureServiceProvider.php +++ b/src/AdminSecureServiceProvider.php @@ -30,9 +30,11 @@ class AdminSecureServiceProvider extends ServiceProvider // * Cron Report everyday $this->app->booted(function () { - /** @var \Illuminate\Console\Scheduling\Schedule */ - $schedule = $this->app->make(Schedule::class); - $schedule->command('ldcweb:admin-secure-sync')->daily(); + if ($this->app->environment('production')) { + /** @var \Illuminate\Console\Scheduling\Schedule */ + $schedule = $this->app->make(Schedule::class); + $schedule->command('ldcweb:admin-secure-sync')->daily(); + } }); $router = $this->app->make(Router::class);