Level 75
It's not possible. On the server check if it can be appended, if so then just append it without that blade directive.
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
I have one question can its possible to append blade directive from ajax request on success...
$('.data').append('@can('report excel-download' )\n' +
' <div class="col-md-6">\n' +
' <a href="/download/xlsx/?filter=result.request.filter"\n' +
' class="excel mb-2 btn-icon btn-shadow btn-sm btn btn-outline-success float-right">\n' +
' <i class="lnr-download"> Export as Excel </i></a>\n' +
' </div>\n' +
'@endcan');
Can it is possible? Thank in advance.
Please or to participate in this conversation.