php - How to update the multiselected checkbox values in laravel
120
multiselected checkbox
I want to update the values in database. Please help me. The value is coming from the view like array in controller
$user=CmsUser::find($id);
$data=$req->all();
if(count($req->input("involved"))!= 0){
$values=$req->input('involved');
foreach ($values as $value){
$subscriberNewsletter= CmsSubscriberInvolve::where('subscriber_id',$id)
->update(["value"=>$value] );
}
}