I want to upload a file in a sftp account with the package https://github.com/thephpleague/flysystem-sftp
But i don't know really how to achieve the storage of the file.
Hope someone could help me and show me how to store the $file
Here my controller :
$file = Excel::create('' . $date . '' , function($excel) use ($licencies) {
$excel->sheet('Excel', function($sheet) use ($licencies)
{
$sheet->fromArray($licencies);
});
})->string('xlsx');
//Storage::disk('sftp')->put('Licences2018 - FFRXIII : ' . $date . '', $file);
$adapter = new SftpAdapter([
'driver' => 'sftp',
'host' => '',
'port' => 22,
'username' => '',
'password' => '',
'root' => '/DIRECTORY',
'timeout' => 10
]);
$filesystem = new Filesystem($adapter);
$adapter->connect();
dd($adapter);