以下是我的代码,
<span><a href="{!! route('approve', ['id' => $user->id]) !!}"><img alt=""
src="http://school.glwh.org/wp-content/uploads/bigstock-vector-green-
positive-checkmar-16955600.jpg"
style="height: 85px; width: 80px" id="imgClickAndChange"
的onclick =&#34; changeImage()&#34; /&GT;
在控制器中,
public function postApprove($id)
{
$application = Move::where('id', '=', e($id))->first();
if($application)
{
$application->approved = 1;
$application->save();
return redirect()->route('driver');
}
此coe将dbfield值更改为&#39; 1&#39; onclick但是当另一个点击它时,它的价值就是&#39; 0&#39; 0&#39; 0为此我如何改变我的代码