Laravel: Get values of checkboxes
You can use
Input::all()
or
Input::get('camera_video')
You should update name of your checkbox input to camera_video[]
as array and you are good to go. You will get input array.
<input type="checkbox" name="camera_video[]" value="{{$video->id}}"> <label>{{$video->name}}</label>
If you are using Laravel 5.x.x you should use Request object:
public function yourMethod(Request $request)
{
$cameraVideo = $request->input('camera_video');
...
}
You just need to define the name as an array so that you can fetch the input as array in Laravel. Like this:
<input type="checkbox" name="camera_video[]" value="{{$video->id}}"> <label>{{$video->name}}</label>