Laravel storage ftp disconnect

2.1k views Asked by At

Is there a way to call the disconnect() (in flysystem this function is exists, https://github.com/thephpleague/flysystem/blob/master/src/Adapter/Ftp.php#L189) function on a ftp-adapter (storage library)?

I do something like this:

$ftp = Storage::disk('ftp');
$ftp->makeDirectory('test');
$ftp->disconnect(); // this does not work...

Does anybody have an idea?

1

There are 1 answers

0
Rwd On BEST ANSWER

If you want to call the disconnect() method you should be able to:

$ftp->getDriver()->getAdapter()->disconnect();

Hope this helps!