我使用Laravel 5.3。我在公共目录中创建了file.txt
并希望移动它。在修补程序控制台中,我执行命令:
>>> $path = public_path() . '/file.txt';
=> "/home/jan/fun/tad/public/file.txt"
>>> $newPath = public_path() . '/new_folder/file.txt';
=> "/home/jan/fun/tad/public/new_folder/file.txt"
>>> Storage::move($path, $newPath);
League\Flysystem\FileNotFoundException with message 'File not found at path: home/jan/fun/tad/public/file.txt'
我尝试过不同的组合,但都没有。
我应该如何构建正确的路径?