Skip to content

Instantly share code, notes, and snippets.

@MrWeb
Created October 12, 2020 10:19
Show Gist options
  • Save MrWeb/c18d8ae7459fe07a274ad011bbf149a8 to your computer and use it in GitHub Desktop.
Save MrWeb/c18d8ae7459fe07a274ad011bbf149a8 to your computer and use it in GitHub Desktop.
Dynamic FTP Laravel Filesystem
$filesystem = new Filesystem(new Adapter([
'host' => $this->portal_db_data->ftp_server,
'username' => $this->portal_db_data->ftp_user,
'password' => $this->portal_db_data->ftp_pass,
/** optional config settings */
'port' => 21,
'root' => $this->ftp_file_path,
'passive' => true,
'ssl' => true,
'timeout' => 30,
]));
return $filesystem->put($this->ftp_file_name, 'File Content');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment