# Switcher

# Basic usage

Please note that if you need to pass in an unselected default value, it should be :value="false", and this false will not be treated as a string

<x-input-switcher name="switch1" :value="true"></x-input-switcher>
<x-input-switcher name="switch2" :value="false"></x-input-switcher>
显示代码

TIP

After submitting the form, the data directly obtained is string type true or false, You need to use the following statement to convert a string to a boolean type.

$switch1 = $request->boolean('switch1');