Answer the question
In order to leave comments, you need to log in
How to make a get request to the server?
Hello. I want to make a dynamic sorting by records from the database and so that it is somehow displayed in the url'e. To do this, I call a function on the front. I use axios in the function:
function sort(param, type){
axios.get('sort',{
params:{
type: type,
param: param
}
}).then((response)=>{
console.log(response)
}).catch((error)=>{
console.log(error.response)
});
}
Route::get('sort?type={type}¶m={param}','[email protected]');
sort?type=films¶m=date
how to achieve this?
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question