title: Input::has for radio button value in if statement laravel
body: <p>So i got this form in a page for my laravel project where my form does a get request to the url.</p>
  
  <pre><code>&lt;div class="col-sm-2 form-group"&gt;
      &lt;div class="radio"&gt;
          &lt;label&gt;&lt;input name="BalanceType" type="radio" value="pos"&gt;
          Positiv&lt;/label&gt;
      &lt;/div&gt;
  &lt;/div&gt;
  
  &lt;div class="col-sm-2 form-group"&gt;
      &lt;div class="radio"&gt;
          &lt;label&gt;&lt;input name="BalanceType" type="radio" value="neg"&gt;
          Negativ&lt;/label&gt;
      &lt;/div&gt;
  &lt;/div&gt;
  
  &lt;div class="col-sm-2 form-group"&gt;
      &lt;div class="radio"&gt;
          &lt;label&gt;&lt;input name="BalanceType" type="radio" value="null"&gt;
          Noll&lt;/label&gt;
      &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>Ive understood that if you gonna have radio buttons then their name better be the same but with different values if you want to check and uncheck the others.</p>
  
  <p>Now what i use my radio buttons for is filtering different type of users and their balance if its negative, positive or null. </p>
  
  <p>Now im trying to figure out what i should write in my if statement in my controller. Before i tried checkboxes and used if(Input::has('name')) and so on. This worked but that was only for checkboxes with different names, now i want to use radio buttons.</p>
  
  <p>My question is, how do i check if a radio button with a specific type of value is checked like i did with checkboxes and Input::has?</p>
  
  <p>My controller:</p>
  
  <pre><code>public function balanceCheck()
  {
      $user = Auth::user();
      $users = Auth::user()-&gt;school-&gt;users()-&gt;orderBy('id', 'DESC')-&gt;get();
  
  
      if()
      {
          $users = Auth::user()-&gt;school-&gt;users()-&gt;where('balance', '&gt;', 0)-&gt;orderBy('id', 'DESC')-&gt;get();
      }
      if()
      {
          $users = Auth::user()-&gt;school-&gt;users()-&gt;where('balance', '&lt;', 0)-&gt;orderBy('id', 'DESC')-&gt;get();
      }
      if()
      {
          $users = Auth::user()-&gt;school-&gt;users()-&gt;where('balance', '=', 0)-&gt;orderBy('id', 'DESC')-&gt;get();
      }
  
      return View::make('admin.overview', ['user' =&gt; $user, 'users' =&gt; $users]);
  }
  </code></pre>
  
  <p>Thanks in advance</p>