| Conditions | 2 |
| Paths | 2 |
| Total Lines | 11 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 43 | private function registerSchedule() |
||
| 44 | { |
||
| 45 | if (!config('rotate.schedule.enable', true)) { |
||
| 46 | return; |
||
| 47 | } |
||
| 48 | |||
| 49 | $this->callAfterResolving(Schedule::class, function (Schedule $schedule) { |
||
| 50 | $cronOldVersion = config('rotate.logs_rotate_schedule', '0 0 * * *'); |
||
| 51 | $cron = config('rotate.schedule.cron', $cronOldVersion); |
||
| 52 | |||
| 53 | $schedule->command('rotate:logs')->cron($cron); |
||
| 54 | }); |
||
| 57 |