I m newbee in laravel. I am sending such type of response through Postman. and in Laravel controller I m getting this response in $request.
[{
"id": 40,
"cname": "Ramesh",
"constraint_value": "",
"r_id": "6",
"rtype_id": null,
"deleted_at": null,
"created_at": null,
"updated_at": null,
"input": "111",
"input2": "111"
}, {
"id": 45,
"cname": "Suresh",
"constraint_value": "",
"r_id": "6",
"rtype_id": null,
"deleted_at": null,
"created_at": null,
"updated_at": null,
"input": "222",
"input2": "222"
}, {
"id": 49,
"cname": "Raj",
"constraint_value": "",
"r_id": "6",
"rtype_id": null,
"deleted_at": null,
"created_at": null,
"updated_at": null,
"input": "333",
"input2": "333"
}]
I am facing difficulty in
How to count the total no of objects in array which I am receiving in $request. I had used count($request) or sizeOf($request) but its returning only 1 although there are 3 arrays. Help me in this.
How to save the data in database through such arrays.I want to save the values of input and input2.