Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

Flex's avatar
Level 4

TokenMismatchException in VerifyCsrfToken.php line 67

hi, got above error when I submit My form data.


    
    @extends('layouts.app1')

    @section('title')
    <h3>Board of Directors</h3>
    @endsection
    

    @section('content')
    

    <script type="text/javascript" src="{{ asset('/js/tinymce/tinymce.min.js') }}"></script>
<script type="text/javascript">
  tinymce.init({
    selector : "textarea",
    plugins : ["advlist autolink lists link image charmap print preview anchor", "searchreplace visualblocks code fullscreen", "insertdatetime media table contextmenu paste"],
    toolbar : "insertfile undo redo | styleselect | bold italic | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | link image"
  }); 
</script>

    <form action="/create" method="post">
  
   

      <div class="form-group">
      



        <textarea name='body'class="form-control">{{  old('body')  }}</textarea>
      </div>
      <input type="submit" name='publish' class="btn btn-success" value = "Publish"/>
      <input type="submit" name='save' class="btn btn-default" value = "Save Draft" />
    </form>
    @endsection

   
 
   
    

how can I fix this?

0 likes
5 replies
SCC's avatar

I think you need to add the CSRF field under your opening form tag.

{{ csrf_field() }}
1 like
Flex's avatar
Flex
OP
Best Answer
Level 4

solution is this

change PostFormRequest.php as

 public function authorize()
      {    
        
          return true;
       
      }

Please or to participate in this conversation.