There is a switch button in the form. My purpose of using this switch button is to determine whether it is passive or active. When I submit the submit form, its value is "on". What I want to do is to go to the controllers as "passive" if its value is "active" if it is selected, and write it to the database like that.
Add standard form only, not ajax
HTML Code below
<div class="col-lg-6">
<span class="switch">
<label>
<input name="status" type="checkbox" checked="checked"/>
<span></span>
</label>
</span>
<span class="form-text text-muted">{{ __('Is it active?') }}</span>
</div>
</div>
$model->status = ($request->status) ?? 1 : 0 ;