Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[10.x] Ordering by model's custom created_at column #801

Merged
merged 3 commits into from
Jan 30, 2024

Conversation

stevebauman
Copy link
Contributor

This PR brings Scout into 100% parity with Eloquent's latest and oldest methods, which retrieve the model's created at timestamp by default, and fall back to created_at when null:

https://github.com/laravel/framework/blob/784d076340d58fd584b1602955e9474a4834a8ca/src/Illuminate/Database/Eloquent/Builder.php#L372-L381

https://github.com/laravel/framework/blob/784d076340d58fd584b1602955e9474a4834a8ca/src/Illuminate/Database/Eloquent/Builder.php#L389-L398

@taylorotwell taylorotwell merged commit 24657f0 into laravel:10.x Jan 30, 2024
13 checks passed
karakhanyans pushed a commit to jasonbosco/scout that referenced this pull request Apr 1, 2024
* Use Eloquent model's created at timestamp for ordering

* Add test

* Whoops, re-add test
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants