So as the title said, I'm struggling to copy a folder to another folder
I tried this but no results
Edit: I got this to work by fixing the $npath variable I was just giving the url without the folder's name $npath = $newk->url;
so the final code will be :
public function copyFolder(Request $request)
{
$id= $request->get('oldf');
$new = $request->get('newf');
$document = Document::find($id);
$newk = Document::find($new);
$npath = $newk->url.'/'.$document->nom;
$file= new Filesystem();
if($file->copyDirectory($document->url, $npath)){
return redirect('home');
}
return redirect('home');
}
any help would be appreciated :)