Support the ongoing development of Laravel.io →
Architecture
Last updated 2 years ago.
0

Let the database make as much filtering as possible. You can do this in SQL.

select * from technicians as t where (t.long- custLong)*(t.long- custLong) + (t.lat- custLat)*(t.lat- custLat) < t.max*t.max

The right side is km^2, but the left isn't take care of it.

Last updated 2 years ago.
0

Sign in to participate in this thread!

Eventy

Your banner here too?

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2024 Laravel.io - All rights reserved.