タイトルの通り、フォルダを別のフォルダにコピーするのに苦労しています
私はこれを試しましたが、結果はありません
編集: $npath 変数を修正することでこれが機能するようになりました。フォルダーの名前なしで URL を指定するだけでした。$npath = $newk->url;
したがって、最終的なコードは次のようになります。
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');
}
どんな助けでも大歓迎です:)