Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

Laravel Code To Rename file on server in the storage folder

///PLEASE VOTE ON CODEGREPPER IF THIS CODE HELPS YOU 
$destination = 'public/reports/'.$oldreport.'.pdf';//or any extension such as jpeg,png
        $newdestination = 'public/reports/'.$reportkey.'.pdf';
      $bb=  Storage::rename( $destination, $newdestination ); // keep the same folder to just rename file on server
 
PREVIOUS NEXT
Tagged: #Laravel #Code #To #Rename #file #server #storage #folder
ADD COMMENT
Topic
Name
9+1 =