I wanna copy or move a directory to a new directory in laravel but the copyDirectory function always return false to me. Am I doing anything wrong with my code? Thanks in advance
$destinationDir = 'storage/Components/'.'Compressor'.'/'.$approvedRequest['compressor_model'].'/';
$success = File::copyDirectory(public_path().$approvedRequest['attachment_dir'], public_path().$destinationDir,true);
$compressorUpdate->attachment_dir = $destinationDir;