i have a parameter in my function JS .. The goal is when i click on my button the parameter should be assigned on new variable Laravel .. i want to pass my data from JS to Laravel
<script type="text/javascript" >
function change_theme(color) {
{{ $idc = color }}//somthing like this
document.getElementById('iframe').setAttribute("src","{{(route('generate.pdfColor', ['slug' => 'student', 'id' => '56', 'color' => '$idc']))}}");
}
</script>