why does laravel not return an item from a collection?

JSON response provides snake case results, but Laravel relations are written as camel case.

So as I mentioned in the comment you will need something like this:

var_dump($allTodos[0][0]->childrenAndSelf)

CLICK HERE to find out more related problems solutions.

Leave a Comment

Your email address will not be published.

Scroll to Top