When I try to login show me token error. I have checked token in view form it\'s right and when comment \\App\\Http\\Middleware\\VerifyCsrfToken::class
,
in the
It works for me.
<meta name="csrf-token" content="{{ csrf_token() }}" />
<script>
function getMessage(){
$.ajax({
headers: { 'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')},
type:'POST',
url:'/getmsg',
// data:'_token = <?php echo csrf_token() ?>',
success:function(data){
$("#msg").html(data.msg);
}
});
}
</script>
{{ Form::button('Replace Message',['onClick'=>'getMessage()']) }}