My code in my View (Laravel framework):
...
var d_from = $('#date_from').val();
$('#total-invoices').html('<a href="#" class="btn btn-xs btn-danger">{{ App\Output_Detail::getTotalInvoices(' + d_from + ') }}</a>');
...
$('#total-invoices') is a HTML Label component.
I have a syntax error in my above code above: ..(' + d_from + ')..
If I put a static variable, the return from my Model function is working fine:
{{ App\Output_Detail::getTotalInvoices("2015-11-03") }}
d_fromvalue because that's run on the client's end.