title: Laravel 8 Copy every page relaod
body: <p>I have a little problem, my system carries out the copying process when I click on my copy button, but now when I use ex. then wants to reload the page on the new page because for some reason (internet, etc.) the page does not load properly, it copies the same entry again.</p>
  <p>Can you somehow block or intercept that this is only triggered when the button is clicked?</p>
  <p>Here ist my code snippet:</p>
  <p><strong>My UserController.php</strong></p>
  <pre><code>public function pduplicate ($id)
      {
          $user = User::find($id);
          $newUser = $user-&gt;replicate([&quot;COLUMS_TO_NOT_COPY&quot;, &quot;id&quot;,  &quot;created_at&quot;, &quot;updated_at&quot;]);
          $newUser-&gt;save();
  
          $users = User::all();
          $newId = $newUser-&gt;id;
  
          return view('users.edit', compact('users', 'newId'));
      }
  </code></pre>
  <p><strong>web.php</strong></p>
  <pre><code>Route::get('/home/pedit/{id}', [App\Http\Controllers\UserController::class, 'pduplicate']);
  </code></pre>
  <p><strong>View Trigger Button</strong></p>
  <pre><code>    &lt;div class=&quot;col-sm-2&quot;&gt;
          &lt;a class=&quot;btn btn-primary&quot; href=&quot;/home/pedit/{{ $users-&gt;id }}&quot;&gt;
              &lt;i class=&quot;fas fa-copy&quot;&gt;&lt;/i&gt; Person kopieren
          &lt;/a&gt;
       &lt;/div&gt;
  </code></pre>