Answers for "significane of csrf token in laravel in detail"

PHP
1

laravel csrf-token in view

<head>

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

</head>
Posted by: Guest on June-15-2021
0

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>
Posted by: Guest on August-10-2021

Browse Popular Code Answers by Language