๐ฉโ๐ป Join our community of thousands of amazing developers!
Our team has released a new package called file-system-watcher. As the name implies, this package can watch changes in the file system and let you act on those changes.Using the package #Here's a simple example that allows you to run some code when a new file gets added.use Spatie\Watcher\Watch; Watch::path($directory) ->onFileCreated(function (string $newFilePath) { // do something... }) ->start(); After calling start, the watcher will start a never-ending loop. When a file is created in the gi...