diff --git a/Abstracts/HotReload.php b/Abstracts/HotReload.php index c0400c1..4d97b61 100644 --- a/Abstracts/HotReload.php +++ b/Abstracts/HotReload.php @@ -53,16 +53,15 @@ class HotReload extends AbstractProcess public function process(Process|null $process): void { $this->pipe = inotify_init(); - $this->readDirectory(APP_PATH . '/app/*'); - $this->readDirectory(APP_PATH . '/routes/*'); + foreach (config('reload.listen') as $key => $value) { + $this->readDirectory($value . '/*'); + } while (!$this->isStop()) { $read = inotify_read($this->pipe); foreach ($read as $item) { - $this->reWatch($item['name']); - } $this->reload();