use Illuminate\Filesystem\Filesystem; $filesystem = new Filesystem(); // Creates a new directory with the default permissions $filesystem->makeDirectory('/path/to/directory');
use Illuminate\Filesystem\Filesystem; $filesystem = new Filesystem(); // Creates a new directory with custom permissions $filesystem->makeDirectory('/path/to/directory', 0755);In this example, we pass a second argument to the `makeDirectory` method to set the permissions of the new directory to `0755`. Package/Library: The `makeDirectory` method is part of the `Illuminate\Filesystem` package which is provided by the Laravel framework.