New in Laravel 13.32. To copy a file from one disk to another (from the local disk to S3, for example), you had to read it entirely from the first one, write it to the second one, then delete the original if it was a move. Disks now have copyToDisk() and moveToDisk().
Before
$contents = Storage::disk('invoices')->get($name); Storage::disk('archives')->put("2026/{$name}", $contents); Storage::disk('invoices')->delete($name);
Since Laravel 13.32
Storage::disk('invoices')->moveToDisk('archives', $name, "2026/{$name}");
The file is streamed from one disk to the other, without being loaded into memory. Without a third argument, it keeps the same path. moveToDisk() deletes the original only once the copy has succeeded. The first argument can be a disk name or the disk itself.
Your task
Archiviste (the archivist) files the invoices, whose name starts with the year (2026-INV-042.txt). archive() moves them from the invoices disk to their year's folder on the archives disk, and backUp() copies them to the backups disk. Rewrite these two methods with moveToDisk() and copyToDisk().