title: Laravel - edit form updated checkbox value
body: <p>I have a form created for editing a Trip. One field is 'Public' which is a boolean. When public is checked as true, I can't get it to show and update on the edit form. </p>
  
  <p><strong>addTrip.blade.php</strong></p>
  
  <pre><code>  &lt;div class="form-group"&gt;
          {!! Form::label('is_public', 'Make Trip Itinerary Public') !!}
          {!! Form::checkbox('is_public', 'value'); !!}
  &lt;/div&gt;
  </code></pre>
  
  <p><strong>editTrip.blade.php</strong></p>
  
  <pre><code>&lt;div class="form-group"&gt; Make  Public
      &lt;input type="checkbox" name="is_public" class="switch-input" value="{{$trip-&gt;is_public}}" /&gt;
      &lt;/div&gt;
  </code></pre>
  
  <p><strong>TripController</strong></p>
  
  <pre><code>public function update(Request $request, $id)
  {
      $this-&gt;validate($request, [
        'name'         =&gt; 'required',
        'email'        =&gt; 'required',
        'destination' =&gt; 'required',
        'startdate'   =&gt; 'required',
        'enddate'     =&gt; 'required',
        'user_id'     =&gt; 'required',
  
      ]);
  
      //Update Trip
      $trip = Trip::find($id);
      $trip-&gt;name = $request-&gt;input('name');
      $trip-&gt;email = $request-&gt;input('email');
      $trip-&gt;destination = $request-&gt;input('destination');
      $trip-&gt;startdate = $request-&gt;input('startdate');
      $trip-&gt;enddate = $request-&gt;input('enddate');
      $trip-&gt;is_public = $request-&gt;has('is_public');
      $trip-&gt;save();
  
      return redirect('trips')-&gt;with('sucess', 'Trip Updated');
  }
  </code></pre>