Как мне объявить контроллер, используя флажок в этой ситуации?
Контроллер:
return User::create([
'firstname' => $data['firstname'],
'lastname' => $data['lastname'],
'usertype' => $data['usertype'],
'email' => $data['email'],
'password' => Hash::make($data['password']),
]);
Код:
<div class="form-group{{ $errors->has('usertype') ? ' has-danger' : '' }}">
<div class="d-flex justify-content-center" >
<div class="custom-control custom-radio custom-control-inline">
<input type="radio" id="customRadioInline1" name="usertype" value="mokytojas" class="custom-control-input" required autofocus>
<label class="custom-control-label" for="customRadioInline1">Mokytojas</label>
</div>
<div class="custom-control custom-radio custom-control-inline">
<input type="radio" id="customRadioInline2" name="usertype" value ="paskaitu_lektorius" class="custom-control-input" >
<label class="custom-control-label" for="customRadioInline2">Paskaitų lektorius</label>
</div>
</div>
</div>