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

Where Between clause doesn't work with relations #171

Closed
JordanR-Surge opened this issue Jul 13, 2021 · 1 comment
Closed

Where Between clause doesn't work with relations #171

JordanR-Surge opened this issue Jul 13, 2021 · 1 comment

Comments

@JordanR-Surge
Copy link

Describe the bug
I need to do a where between on a relation but it seems to break down when using the start and end parameters.

To Reproduce
Query: Users::select('users.name')->join('posts', 'posts.user_id', '=', 'users.id')->filter(['posts' => [ 'created_at' => [ 'start' => '2021/01/21', 'end' => '2021/01/23' ] ]])->get();

Error:
You must set posts.updated_at.start in whiteListFilter in Users.php

Expected behavior
It should create a whereBetween using the posts updated_at

@mehdi-fathi
Copy link
Owner

@JordanR-Surge Thanks for the report. It's been fixed in the 2.5.3 version.

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