I work with Laravel 5.3. I have created file.txt
in public directory and want to move it. In tinker console I execute commands:
>>> $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'
I have tried different combinations, none worked.
How should I construct correct path?