Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

add csrf token laravel

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

<script type="text/javascript">
$.ajaxSetup({
    headers: {
        'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
    }
});
</script>
 
PREVIOUS NEXT
Tagged: #add #csrf #token #laravel
ADD COMMENT
Topic
Name
6+2 =