I have modal blade page , which loaded by controller which called via ajax.I have a hidden input field.I get the value from input field via javascript dom. I stored in a js variable.The variable works good. I want this value in php variable on same page, for some checking purpose.
Here my code is ....
<script>
var invoice_no = document.getElementById('invoice_no').value;
</script>
@php
$invoice_no = ;
@endphp
Note : It's a modal (invoiceModal.blade.php)