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
:value="false"
false
<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.
true
$switch1 = $request->boolean('switch1');
← Number Slider →