In my template I call a function like this:
loadResults('asc');
function loadResults(order) {
return $.get('{{ url('_example_results', { 'order' : ''}) }}'+order, function (html) {
$('#results').html(html);
});
}
The function in my controller looks like this:
public function resultsAction($order, Request $request)
{
// content is not crucial for solving my problem
}
My results don't get loaded, I get the following error:
Controller "...resultsAction()" requires that you provide a value for the "$order" argument (because there is no default value or because there is a non optional argument after this one).
What adjustments do I need to make?