phplaravelftpstoragethephpleague

Laravel storage ftp disconnect


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?


Solution

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

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

    Hope this helps!