you may want to check jquery's ajax function
$.ajax({
type: "DELETE",
url: "{{ URL::route('someroute') }}"
});
It works thank you very much! I used 'URL::to' (I think 'URL::route' is for named routes)
url: "{{ URL::to('admin/categories/" + idtodelete +"')}}"
But I see strange behavior, the browser doesn't go to the address admin/categories/3 (3 for the example). It just deletes the record. I don't understand, It gets deleted without using the route??
Edit: I checked it with NetBeans, the code in the route and the code in the controller destroy method, do get executed. But the redirection (in the destroy method) does not happen,I don't understand why.
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community