This function is not integrated in the default lumen, as if it were in laravel, you have to install the Flysystem library, you can verify the process in this tutorial
The steps would be:
$ app-> register (GrahamCampbell \ Flysystem \ FlysystemServiceProvider :: class);
-
Copy the flysystem.php configuration file from the package. That
is to copy the file that is in the directory vendor / graham-campbell / flysystem / config / flysystem.php to the folder
config.
-
In the ftp section, you enter your access data:
'ftp' = > [
'driver' = > 'ftp',
'host' = > 'ftp.example.com',
'port' = > twenty-one,
'username' = > 'your-username',
'password' = > 'your-password',]
- Use it in your controller:
use GrahamCampbell \ Flysystem \ Facades \ Flysystem;
Flysystem :: connection ('ftp') - > read ('FileUpload.txt');