i had a user list form in laravel. so i want when i click the table row, it automatically load the user details from database without redirecting. i've heard about ajax. but i have no idea how to use it in laravel..
i want to make like this
but without redirecting page..
$("tr").click(function()
{
$.ajax({
type: "GET",
url: $(this).data("href"),
dataType: "text",
success : function(data) {
$('#details-container').load(data)
}
});
});
does it supposed to be like this? but how did i get the data from database? i have no idea. please help me..