Change filename while storing files with FTP in Laravel

  laravel, laravel-8, laravel-filesystem, php

may I ask how to change the filename while storing files with FTP?

Storage::(‘disk’)->put(‘folder/myPDF.pdf’, $file)

The code above is storing my file as folder/myPDF.pdf/(myfile) but I want to put myPDF.pdf as my filename not folder, anyway I can solve it? Thanks in advance.

Source: Laravel

Leave a Reply