How can I tell Algolia scout to import lat and lng into the _geoloc object?

Good day, I’m having a hard time figuring how to correctly import an existing MySql database so I can use the built in geoloc.

In my case I have a lat column and a lng column, is there a way to include these two in the _geoloc object?

If I can’t, is there any way to use my data for the geolocation with algolia?

Hi there!

When using our Scout Extended integration for Laravel, you can customize records by implementing the toSearchableArray method in your models.

This allows you to add any extra attribute to your record before returning it.

You can also write your own transformer, which lets you type-hint any dependencies your transformer may need in its constructor.

Best,