title: Editing radio button in laravel
body: <p>I am trying to edit data using radio button but whenever I try to edit it, the result return are blank. I have search for other people post similar to his but it still doesn't work (eg: <a href="https://stackoverflow.com/questions/3929949/edit-radio-button-dropdown-list">Edit Radio Button / Dropdown list</a>)</p>
  
  <p>Could I have done something wrong here?</p>
  
  <p>When I used the dd function on it, it will just return me this:</p>
  
  <pre><code>"gender" =&gt; null
  </code></pre>
  
  <p>But previously I used this I can get my result                <code>&lt;input type="text" name="gender" value="{{ $object-&gt;gender }}" class="form-control"&gt;</code></p>
  
  <p>Here is my code:</p>
  
  <pre><code>  &lt;form class="form-horizontal" method="post" action="{{ url('/user/show/'.$object-&gt;id) }}"&gt;
            {{ method_field('PUT')  }}
            {{ csrf_field() }}
  
            &lt;label class="col-md-2"&gt;Gender:&lt;/label&gt;
              &lt;div class="col-md-6"&gt;
               &lt;input type="radio" name="gender" value="{{$object-&gt;male}}"&gt; Male&lt;br&gt;
               &lt;input type="radio" name="gender" value="{{$object-&gt;female}}"&gt; Female&lt;br&gt;              
              &lt;/div&gt;
        &lt;div class="form-group"&gt;
          &lt;div class="col-md-6-offset-2"&gt;
            &lt;input type="submit" class="btn btn-primary" value="Save"&gt;
          &lt;/div&gt;
        &lt;/div&gt;
  
      &lt;/form&gt;
  </code></pre>
  
  <p>Controller:</p>
  
  <pre><code>public function edit($id){
      $object = user_info::find($id);
  
      return view('edit', compact('object'));
  
  }
  
  public function update(Request $request, $id){
      $object = user_info::find($id);
       $object-&gt;gender = $request-&gt;input('gender');
  
      //$object-&gt;update();
  dd($object);
      return redirect('/home');
  }
  </code></pre>