diff --git a/src/Services/SaveScan.php b/src/Services/SaveScan.php index 0b48cbe..ef6925f 100644 --- a/src/Services/SaveScan.php +++ b/src/Services/SaveScan.php @@ -4,6 +4,7 @@ use Carbon\Carbon; use Illuminate\Support\Facades\DB; +use Illuminate\Support\Facades\File; use Illuminate\Support\Facades\Lang; use TomatoPHP\FilamentTranslations\Models\Translation; @@ -19,7 +20,9 @@ public function __construct() public function save() { $scanner = app(Scan::class); - collect($this->paths)->each(function ($path) use ($scanner) { + collect($this->paths)->filter(function($path) { + return File::exists($path); + })->each(function ($path) use ($scanner) { $scanner->addScannedPath($path); });