skip to Main Content

Laravel Logout Using AJAX – Jquery ajax

I'm trying to write an AJAX script that will log me out of Laravel using a POST request: $.ajax({ headers: { 'X-CSRF-Token': "{{ csrf_token() }}" }, type: "POST", url: '/logout', success: function() { window.location.replace('https://portal.nchinc.com/?logout=timeout'); } }); The result is I…

VIEW QUESTION

Can't use the rows being retrieved from my database to build <li> items – Jquery ajax

app.get('/api/getTransactions/', function(req, res){ console.log("GET: Transactions"); let sql = 'SELECT * FROM balance;'; db.all(sql, [], function(err, rows){ var result = {}; if(err){ res.status(404); result["error"] = err.message; } else { console.log(JSON.stringify(rows)); res.json(rows); } }); }); function createTL() { $.ajax({ method: "GET", url:…

VIEW QUESTION
Back To Top
Search