PHP code example of ragingdave / flysystem-sftp-laravel

1. Go to this page and download the library: Download ragingdave/flysystem-sftp-laravel library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

ragingdave / flysystem-sftp-laravel example snippets


RagingDave\Filesystem\Sftp\SftpServiceProvider::class,

'disks' => [
    'sftp' => [
        'driver' => 'sftp',
        'host' => env('SFTP_HOST'),
        'port' => env('SFTP_PORT', 22),
        'username' => env('SFTP_USERNAME'),
        'password' => env('SFTP_PASSWORD'),
        'privateKey' => storage_path('keys') . '/sftp_key', // This can also be the full private key contents
        'root' => env('SFTP_ROOT'),
        'timeout' => env('SFTP_TIMEOUT', 10),
    ],
],