You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jun 2, 2024. It is now read-only.
On the request of get() you can then call $pricesDB->createdAt() and $pricesDb->updatedAt()
The queries are meant to find documents itself, query reference, but you can create custom filters to query within a document, I would recommend if using Laravel, push your entire document data into a collection object if you want the use of collection methods.
I feel created_at and updated_at should be included by default? A lot of the queries are going to be done using the results() or first() methods and at that point you've lost 2 important fields that you will probably want access to.
Say you wanted to query all users with the name Joe and display all of their records:
That would return an array but only with the fields I specified when storing it, I couldn't get, for example, their created at date (which could represent their registered date) in that one line of code, if I want to get those timestamps as well as the standard user fields, I have to do this:
That would give me an array with the fields and the timestamps that I would expect, but it just seems like a lot of extra leg work to get something that is stored along side the same data? That code is untested by the way and this is irrelevant to Laravel/Collections.
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Is it possible to retreive the created_at and updated_at timestamps with the results call?
At the moment I have a relationship between 2 models and am retrieving them like so:
But doing it like this means that $project->prices does not have the timestamps.
The text was updated successfully, but these errors were encountered: