@msantos you could used redis to do this it will be faster and better no need of models. Check this article I wrote a while ago https://somniotech.com/blog/geospatial-solutions-with-laravel-redis. This is the specific function https://redis.io/commands/georadius/
Good luck let me know if I can help with anything.
Delivery areas. I want every restaurant to be able to set up a different range of areas to deliver with different prices. For example, if the customer is close to the restaurant (0-3km) the minimum order would be 12€ and the delivery price 0€. But if the customer is far (3-10km), the minimun order would be 25€ and the delivery fee 2€. I want it this way because all of our restaurants have their own delivery people.
I developed this feature based on the zipcode we defined the price and sooner the order is placed it showed the delivery charge to customer.
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community