Level 2
I just can't get around this....i also get an error TokenMissmatchException but not right away...
the ajax request works until the csrf token is changed....laravel does this automatically. i mean changing the token. This is my code:
$(document).ready(function() {
$(document).on('input paste', '#soap', function () {
$.ajax({
type:'POST',
url:'/soap',
headers: {'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')},
data: $('#countryCode, #soap').serialize(),
success:function(data){
$('input[id=msg]').val(data.msg);
}
});
});
});
What am i doing wrong...why do i get wrong token...it's like it uses the same token every time?