Using js array in laravel blade foreach
In a laravel blade page I have a controller sending planTypes and stored like this: arr = []; var planTypes = @json($planTypes); $('#multiselect').change(function (e) { var plan_id = $(this).val(); arr.push(plan_id); }); What it does? For any change in a dropdown…