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

Query Builder: Impossible to get the distance in a query builder when using eloquent relations #15

Open
tiagomichaelsousa opened this issue May 18, 2019 · 4 comments

Comments

@tiagomichaelsousa
Copy link

tiagomichaelsousa commented May 18, 2019

When using query builders and eloquent relations to filter the data, the attribute distance cannot be retrieved, making it impossible to order by distance.

For example, a Book belongs to a Library, and the Library has the fields latitude and longitude, so how can i calculate how far i am from the Book ?

image

@tiagomichaelsousa tiagomichaelsousa changed the title Query Builder c Query Builder: Impossible to get the distance in a query builder when using eloquent relations May 18, 2019
@Shi974
Copy link

Shi974 commented Apr 8, 2020

Hey there @tiagomichaelsousa , I have the same problem (issue #26 ).
Have you found a solution by any chance ?

@tiagomichaelsousa
Copy link
Author

Hi @Shi974, unfortunately, I didn't found the solution. This was for a personal project that I stopped to develop.

@malhal
Copy link
Owner

malhal commented Apr 8, 2020

This might work now with the recent update to do with table prefixes

@ianfortier
Copy link

This might work now with the recent update to do with table prefixes

Can you please share any examples?
image

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

4 participants