1. Go to this page and download the library: Download bluebaytravel/ftp 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/ */
bluebaytravel / ftp example snippets
// Return the files on the server.
Ftp::ls()
// Dependency injection example.
$ftpManager->ls()
BlueBayTravel\Ftp\FtpServiceProvider::class
'Ftp' => BlueBayTravel\Ftp\Facades\Ftp::class
// You can alias this in config/app.php.
use BlueBayTravel\Ftp\Facades\Ftp;
Ftp::users();
use BlueBayTravel\Ftp\Facades\Ftp;
// Writing this…
Ftp::connection('main')->ls();
// ...is identical to writing this
Ftp::ls();
// and is also identical to writing this.
Ftp::connection()->ls();
// This is because the main connection is configured to be the default.
Ftp::getDefaultConnection(); // This will return main.
// We can change the default connection.
Ftp::setDefaultConnection('alternative'); // The default is now alternative.
use BlueBayTravel\Ftp\FtpManager;
class Foo
{
protected $ftp;
public function __construct(FtpManager $ftp)
{
$this->ftp = $ftp;
}
public function bar($id)
{
$this->ftp->ls();
}
}
App::make('ftp')->ls();
bash
php artisan vendor:publish
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.