R
R
Romi2021-04-16 23:31:15
Laravel
Romi, 2021-04-16 23:31:15

The attribute-wrapper "original" in the server response came from somewhere - is this a Laravel glitch?

It's a long time to describe the details of the case, but maybe someone offhand knows where this "original" came from?

In short - I make a request to the database - I get the data, I return it through

return response ($ data);

and everything was fine until I called this method from another class.

it still works, but for some reason wrapped my answer in some kind of "original" :|

well, like, instead of

{"foo":"bar"}

it returned

{"original":{"foo":"bar"}}

What is that anyway? ))

I won't fall asleep now))

Laravel is ancient - 5.x - is it some kind of glitch, or is it some kind of Laravel feature?

Can anyone come across?

Thank you.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexey Sklyarov, 2021-04-16
@romicohen

JSON response in Laravel 5.5 adds additional fields

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question