I'm trying to fetch data from URL with GET method on javascript,
fetch('/api/staffattendance/{makedate}')
.then(res => res.json())
.then(res => {
//this.staffs = res.data;
console.log(res.data);
})
.catch(err => console.log(err));
How can I pass the variable here:
fetch('/api/staffattendance/{makedate}')
Like this
Thanks in Advance,