title: Post value radio button with laravel
body: <p>I have two fields in my database 'administrator' and 'moderator' type radio button and I would like:</p>
  
  <ul>
  <li><p><strong>Save the value 1 when I chose the administrator and the value 0 for
  the moderator</strong></p></li>
  <li><p><strong>and when I chose the moderator I would like to save the value 1 and
  the value 0 for the adminitrator</strong></p></li>
  </ul>
  
  <p>I try with this code but it doesn't work.</p>
  
  <p>my view : </p>
  
  <pre><code>&lt;label class="mt-checkbox"&gt;
    &lt;input type="radio" id="administrator" name="radio" value="administrator"&gt; Administrator
  &lt;/label&gt;
  &lt;label class="mt-checkbox"&gt;
    &lt;input type="radio" id="moderator" name="radio" value="moderator"&gt; Moderator
  &lt;/label&gt;
  </code></pre>
  
  <p>My Controller : </p>
  
  <pre><code>public function add_profil(Request $request)
      {
  
              $profil = new Profil();
  
              if($request-&gt;adminitrator == 'checked'){
  
                  $profil-&gt;adminitrator = 1;  
                  $profil-&gt;moderator = 0;  
  
              } 
              elseif ($request-&gt;moderator == 'checked')   {
  
                  $profil-&gt;moderator = 1;  
                  $profil-&gt;adminitrator = 0; 
              }   
  
              $profil-&gt;save();
  
  
      }
  </code></pre>