Heimdall
1 month ago

checkbox insert

Posted 1 month ago by Heimdall

Hello,

I have form, with checkbox, but i want register all case checked but idk how..

My code html:

  				@foreach($categorylist as $categorylist)
  					<input type="radio"  name="categorybox[]"  value="{{$categorylist->id}}" class="checkbox">	{{$categorylist->name}}		
  				@endforeach

and my controller

	     $category_dish = new category_dish();
	     $category_dish->category_id = request("categorybox");
	     $category_dish->dish_id = $Dishs->id;
	     $category_dish->save();

Ty

Please sign in or create an account to participate in this conversation.