Monday, March 13, 2017

Access ftp via Laravel

anyone know how to access files and folders ftp with Laravel, I'm using this package --> https://github.com/harishanchu/Laravel-FTP

and I have an error, the error said

InvalidArgumentException in FtpManager.php line 59: 
Ftp [default] not configured.

but I already configure in config/ftp.php

'default' => 'connection1',


'connections' => array(

        'connection1' => array(
            'host'   => 'localhost',
            'port'  => 21,
            'username' => 'user1',
            'password'   => 'admin',
            'passive'   => false,
        ),
)

// controller

$listing = FTP::connection('default')->getDirListing('ftp://192.168.100.2/');
dd($listing);

is something wrong with my code, I already read the documentation but still not get it, anyone know or ever do this and success?

Thanks for answering, I'm sorry for bad English :)



via yulianto saparudin

Advertisement