vendredi 17 février 2017

Request not showing all data in array

I am using laravel 5.1 and I am in the middle of the problem.

enter image description here

<script type="text/javascript">
var counter=0;
$(document.body).on('click',".popCategory",function(){

var appendcategory="";
if(counter<100){
counter++;
 appendcategory+='<input type="text" class="form-control"   name="category['+counter+']" placeholder="Category" value="545454" />';
$('.category_append').append(appendcategory);
 }
 })
</script>

As shown in image I have appended the category with the help of jquery and when I submit the form I get the result as shown in below: enter image description here

The problem is that I only get one value when I have submitted three value of category . you can see the inspect element below:

enter image description here

Can someone help me?



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire