Home Automatic update page when new items inserted into database - Laravel
Reply: 1

Automatic update page when new items inserted into database - Laravel

user9332352
1#
user9332352 Published in 2018-02-14 04:23:32Z

I am new to laravel and i am making a page which update automatically when we add data to the database, say user registration info. Plz help me to sort out this.

user9332352
2#
user9332352 Reply to 2018-02-14 07:36:54Z

I did this but its not working.

`

// refresh table after 5 secs

sendRequest(); //call function

function sendRequest(){

$.ajax({

url: "/opt/lampp/htdocs/laravel/blog/app/Http/Controllers/AdminController.php",

success:

function(result){

$('#result').text(result); //insert text of test.php into your div

setTimeout(function(){

sendRequest(); //this will send request again and again;

}, 5000);

}});

});

`

You need to login account before you can post.

About| Privacy statement| Terms of Service| Advertising| Contact us| Help| Sitemap|
Processed in 0.430835 second(s) , Gzip On .

© 2016 Powered by mzan.com design MATCHINFO