如何在laravel项目外设置文件夹目标路径

时间:2020-07-30 05:35:37

标签: php laravel laravel-6

我需要设置$destination到外部项目的路径,需要将文件夹从项目文件复制到我已经使用复制目录功能尝试过的计算机位置

public function approovenew()
{
    $source = "themes/call";
    $destination = "/new-theme";
            
    File::copyDirectory(base_path($source), base_path($destination));
}

1 个答案:

答案 0 :(得分:0)

尝试执行此操作将对您有所帮助

File::copyDirectory(__DIR__ . '/../whatever'$source, __DIR__ . '/../../$destination');