What would be the proper way to decode this json?
my model has
protected $casts = [
'items' => 'array'
];
my json items:
{
"data": [
{
"name": "Google",
"link": "http://google.com"
},
{
"name": "ALink",
"link": "http://link.org"
}
]
}
json_decode($request->items)
returns the error: ErrorException: Object of class stdClass could not be converted to string in file
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire