Support the ongoing development of →
Security Requests Testing
Last updated 1 year ago.

venkyvegas said:

how to create PUT and DELETE method CSRF POC. of simple html post method

you can find it in here : my friend, here is what it says :

put the line below in your form

<input type="hidden" name="_token" value="<?php echo csrf_token(); ?>">

and put this line below at the head of your html

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

and then you can submit your form via ajax by doing this :

        headers: {
            'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')

as your ajax setup


Sign in to participate in this thread!


Your banner here too?


We'd like to thank these amazing companies for supporting us

Your logo here?

The Laravel portal for problem solving, knowledge sharing and community building.

© 2024 - All rights reserved.