Reputation: 925
I am looking to move files in Laravel 5.2 using Storage::move. The code I am using is below:
$file = basename($m);
$new_path= base_path('mailbox_archive/'.$file);
Storage::move($m, $new_path);
I am getting the following error message:
[League\Flysystem\FileNotFoundException]
File not found at path: Users/JamesParsons/Dropbox/virtual/mailbox/17_10-08
-16_20-49-17.json
The paths are as follows:
$m=/Users/JamesParsons/Dropbox/virtual/mailbox/17_10-08-16_20-49-17.json
$new_path=/Users/JamesParsons/Dropbox/virtual/mailbox_archive/17_10-08-16_20-49-17.json
Thanks
Upvotes: 0
Views: 3008
Reputation: 925
I changed the above from
Storage::move($m, $new_path);
To
File::move($m, $new_path);
Upvotes: 0
Reputation: 3684
Your trying to access/move a file on your computer. But you are in a host/vm/server. This will not work as your inside the VM etc and therefore cannot access your dropbox folder.
Upvotes: 0