1.0.1 : Runs scheduled only on production
This commit is contained in:
parent
a6d168f573
commit
24e36b8c63
3 changed files with 10 additions and 5 deletions
|
|
@ -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 !!**
|
||||
|
|
|
|||
|
|
@ -1,4 +1,6 @@
|
|||
# Changelog
|
||||
|
||||
## **Version 1.0.1**
|
||||
*Changed*
|
||||
- Run scheduled only on production envirronement
|
||||
## **Version 1.0.0**
|
||||
### Initial release
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue