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

Can I use different created_at field in several model #5

Closed
jonathanoeijoeng opened this issue May 2, 2023 · 4 comments
Closed

Can I use different created_at field in several model #5

jonathanoeijoeng opened this issue May 2, 2023 · 4 comments

Comments

@jonathanoeijoeng
Copy link

What if I have several model that I want to use DateScope but each model will use different "created_at" field i.e day_submission field.

Thanks

@Sairahcaz
Copy link
Member

Hi @jonathanoeijoeng, I'll add that this week, I hope!

@Sairahcaz
Copy link
Member

Hi @jonathanoeijoeng this should now work in the latest release!

@jonathanoeijoeng
Copy link
Author

Great!! How to choose different created_at field? I cannot find it in changelog.

@Sairahcaz
Copy link
Member

@jonathanoeijoeng it's basically just changing the CREATED_AT constant in your model.
I added it here in the README: https://github.com/laracraft-tech/laravel-date-scopes#fluent-created_at-column-configuration

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

No branches or pull requests

2 participants