Laravel 8 – CRSF Mistmatch

QuestionsLaravel 8 – CRSF Mistmatch
Philippe D. asked 9 months ago

Hello,

just bought gridphp-full v2.8

integration with Laravel OK but when i edit a cel return:{ “message”: “CSRF token mismatch.”, “exception”: ……….}

i put in my blade template in header

<meta name=’csrf-token’ content=”{{ csrf_token() }}”>

and in @section(‘content’)

<script type=”text/javascript”>
$.ajaxSetup({headers: {‘X-CSRF-TOKEN’:$(‘meta[name=”crsf-token”]’).attr(‘content’)}});
</script>

so it’s from Laravel… but how pass the this damned meta {{ csrf_token }}

thanks

Philippe

 

2 Answers
Philippe answered 9 months ago

pfff studid !

put js script in <head> and it’s working…

Thanks

Philippe

Abu answered 9 months ago

Thanks for the update.

Your Answer

18 + 11 =

Login with your Social Id:

OR, enter

Attach code here and paste link in question.
Attach screenshot here and paste link in question.



How useful was this discussion?

Click on a star to rate it!

Average rating 0 / 5. Vote count: 0

No votes so far! Be the first to rate it.

We are sorry that this post was not useful for you!

Let us improve this post!

Tell us how we can improve this post?