fadion / Bouncy

Map Elasticsearch results to Eloquent models
MIT License
71 stars 26 forks source link

Transform #5

Closed AzzAToTV closed 9 years ago

AzzAToTV commented 9 years ago

Can you add support to modify what data get's put into Elasticsearch, like in Elasticquent.

fadion commented 9 years ago

I'm not sure I understand. Can you elaborate?

AzzAToTV commented 9 years ago

Currently in your package, when you put the data into Elasticsearch you call $this->toArray(), i was wondering if you could add an overwritable function that gets the function, so i can change what array gets stored.

Elasticquent has it: https://github.com/adamfairholm/Elasticquent/#document-data

fadion commented 9 years ago

Just pushed a commit. Give it a try and let me know.

AzzAToTV commented 9 years ago

Yes, this works exactly as expected. Thank you :+1: