我正在尝试将值从视图传递到控制器,但它不起作用,它只发送了“已批准”
我的观点
<div class="form-group row">
<label for="colFormLabelLg" class="col-md-2 col-sm-3 control-label control-label-lg"><b>DIGITAL SIGNATURE</b></label>
<div class="col-md-3">
<div class="form-group" id=digital_signature >
<select class="form-control" name="digital_signature" value="{{ old('digital_signature') }}" required autofocus >
<option value=""></option>
<option style="color:green">WITH DIGITAL SIGNATURE</option>
<option style="color:green">WITHOUT DIGITAL SIGNATURE</option>
</select>
</div>
</div>
</div>
我的控制器
public function new_approvel_update(Request $request, $id)
{
if($request->digital_signature == 'WITH DIGITAL SIGNATURE')
{
$input= Student::Where('delete_status','NOT DELETED')->find($id);
$input['center_approved'] = strtoupper ('APPROVED');
$input['date_of_join'] = $request->date_of_join;
} elseif($request->digital_signature == 'WITHOUT DIGITAL SIGNATURE') {
$input= Student::Where('delete_status','NOT DELETED')->find($id);
$input['center_approved'] = strtoupper ('NOT-APPROVED');
$input['date_of_join'] = $request->date_of_join;
}
$certificate->save();
return redirect('new_application')->with('success',' APPLICATION APPROVED SUCCESSFULLY .');
}
至尊宝的传说