Hello user2373229,
In order to set up the custom filesystem you will need to create a service provider. In the provider's boot method, you may use the Storage facade's extend method to define the custom driver.
<?php
namespace App\Providers;
use Storage;
use \SplFileInfo as SplFileInfo;
use Illuminate\Support\ServiceProvider;
class SplFileInfoServiceProvider extends ServiceProvider
{
/**
* Perform post-registration booting of services.
*
* @return void
*/
public function boot()
{
Storage::extend('splfileinfo', function () {
return new SplFileInfo;
});
}
/**
* Register bindings in the container.
*
* @return void
*/
public function register()
{
//
}
}
Once you have created the service provider to register the extension, you may use the splfileinfo driver in your config/filesystems.php configuration file.
You may refer to the docs: https://laravel.com/docs/5.3/filesystem#custom-filesystems