Laravel download files via FTP

This post is going to be about downloading files from the remote server via FTP mechanism in your Laravel application.

Let’s create a controller called DownloadController.php

Now let’s inform about this controller to routes/web.php

That’s it. Now point your browser to http://yourhost.com/downloadFile?file=remote_path/fileName.png.

I hope you like this Post, Please feel free to comment below, your suggestion and problems if you face - we are here to solve your problems.