Reputation: 51
use ajax for laravel 4.x , code
$('#button').click(function(e){
$.ajax({
method:'post',
url:'test',
data:datas,//exists
success:function(data){
},
});
});
but i found it send http request with get,
Upvotes: 0
Views: 282
Reputation: 271
Try this -
$('#button').click(function(e){
$.ajax({
type:'post',
url:'test',
data:datas,//exists
success:function(data){
},
});
});
(Note that method is replaced by type)
Upvotes: 1