I want to fix one issue during file moving in Laravel 5.3
<p>I am developing invoice management system with Laravel framework (version 5.3). The system provides a list of documents in a directory on the server. The documents are JPEG or PDF files, they are saved in DB with some metadata. After save a document data in DB, I want to move it to other directory on server.</p>

<p>I tried it by using <code>File::move($source_path, $target_path)</code> and <code>Storage::move($source_path, $target_path)</code>. But in two case, errors are occurred. </p>

<p>My code is </p>

<pre><code>$save_pdf_path = storage_path('invoices').'\\'.$company.'\\'.$date.'\\';
$pdf_name = $invoice_id."_".$user_id.".pdf";
$full_pdf_path = $save_pdf_path.$pdf_name;

File::move(public_path().'\invoice_tmp\\'.$filename, $full_pdf_path);
or
Storage::move(public_path().'\invoice_tmp\\'.$filename, $full_pdf_path);
</code></pre>

<p><a href="https://i.stack.imgur.com/mbu9s.jpg" rel="nofollow noreferrer">When use File:move(..)</a></p>

<p><a href="https://i.stack.imgur.com/SYAxW.jpg" rel="nofollow noreferrer">When use Storage:move(..)</a></p>

<p>At last, I tried PHP core function <code>rename()</code>, but it is not working too.</p>