title: Laravel - Prevent form resubmission on refresh
body: <p>How can I prevent my form from resubmitting when I refresh the page. Solutions I've found suggest a redirection, which I am using. </p>
  
  <p>The form in view <strong>admin.enrollform.blade.php</strong>:</p>
  
  <pre><code>    &lt;form id="enrollform" class="form-horizontal" role="form" method="post"
        enctype="multipart/form-data"
        action="{{route('storeStudent', ['site' =&gt; $site-&gt;site_url, 'lang' =&gt; $lang] )}}"&gt;
        &lt;input type="visible" name="_token" id="_token" value="{{ csrf_token() }}"/&gt;
        ...
      &lt;/form&gt;
  </code></pre>
  
  <p>The laravel controller:</p>
  
  <pre><code>public function store(Request $request, $site, $lang = null)
  {
  
      ....
  
      return view('admin.enrollform', [
          'message'       =&gt; $message
      ]);
  }
  </code></pre>
  
  <p>If successful, the controller returns a view, which points to the same page. So the same page is loaded again, with a message. And the form is empty.</p>
  
  <p>However if I click refresh at this point, the form submits again. I would like for it just refresh the page, with or without the message it had received from the controller.</p>
  
  <p>Is there any way for me to use the CSRF token to validate this? From what I understand the CSRF token only validates if the session is valid, and has nothing to do with the form itself.</p>
  
  <p>Thanks.</p>