Closed yuan8 closed 1 year ago
It's not clear to me what you're trying to do, and if this is an issue with plugin or how you're using Laravel. Laravel automatically returns JSON if you return data without a view, no need to encode.
If you're still stuck please give me more context (models, controllers & routes).
Cheers
Any feedback @yuan8 ? Happy to help, else will close this issue assuming you figured it out.
sory i missing step. that problem only in my code. i used cast in my model to json data item. so when i used model elastic its twice decode. thanks @pdphilip
i will encode collection to json to strore vue js data but when i was do that always error with message
json_decode(): Argument #1 ($json) must be of type string, array give
dd(json_encode($data->items()));