title: Laravel\Blade - get value of selected radio button dynamically added
body: <p>I'm developing a questionnaire in Laravel. The questions and their answers are printed throw a foreach. Now I need to retrieve the selected radio/answer for each question in order to insert each couple in an indexed array. The problem is that the name of the html tag radio is dynamic and not static so how can I retrieve the answer for each question?</p>
  
  <p>In the code, {{$answer[0]}} is the id of the answer, while {{$answer[1]}} the text of the answer</p>
  
  <pre><code>@foreach ($question-&gt;answers as $answer)
  
     &lt;div class ="radio"&gt;
        &lt;label&gt;
           &lt;input type="radio" name={{$question-&gt;id_question}} value= {{$answer[0]}}&gt;
           {{$answer[1]}}
        &lt;/label&gt;
     &lt;/div&gt; 
  @endif
  @endforeach 
  </code></pre>