做法
安裝套件。
| 1 | composer require league/flysystem-sftp | 
修改 config/filesystems.php 檔,新增一個儲存系統:
| 1 | return [ | 
修改 .env 檔:
| 1 | SFTP_HOST= | 
取得檔案:
| 1 | \Illuminate\Support\Facades\Storage::disk('sftp')->get('file.csv'); | 
參考資料
安裝套件。
| 1 | composer require league/flysystem-sftp | 
修改 config/filesystems.php 檔,新增一個儲存系統:
| 1 | return [ | 
修改 .env 檔:
| 1 | SFTP_HOST= | 
取得檔案:
| 1 | \Illuminate\Support\Facades\Storage::disk('sftp')->get('file.csv'); | 
參考資料