How to create a checkbox field in Laravel

Check box allows users to select one or more options from a pre-defined set of values. To create a checkbox field in Laravel you can use the following code. First parameter is the name of the checkbox and second parameter is the value.

{{ Form::checkbox('name', 'value') }}

This will generate following HTML output,

<input name="name" type="checkbox" value="value">

You can pass third argument as true to output a checkbox which is pre-selected.