New in Laravel 13.26. To move files to new storage without copying everything at once, you had to write the fallback by hand: read the new disk, otherwise the old one, and copy the file over along the way. The read-through driver does exactly that.
Before
if (Storage::disk('new')->exists($name)) { return Storage::disk('new')->get($name); } $contents = Storage::disk('old')->get($name); Storage::disk('new')->put($name, $contents);
Since Laravel 13.26
// config/filesystems.php 'documents' => [ 'driver' => 'read-through', 'primary' => 'new', 'fallback' => 'old', ],
Storage::disk('documents')->get($name);
The disk reads primary first. A file that only exists on fallback is returned, then copied to primary for next time. Writes and file listings target primary.
Your task
Declare a read-through disk named documents in config/filesystems.php, then simplify DocumentController: it must no longer know about the old storage.