kirkbushell / eloquence

A drop-in library for certain database functionality in Laravel, that allows for extra features that may never make it into the main project.
MIT License
547 stars 58 forks source link

Implementing within a Pivot Model #2

Closed bryantAXS closed 10 years ago

bryantAXS commented 10 years ago

Hey Kirk,

I've been trying to use a pivot model to write back some JSON from an API. My biggest issue is I can't get the pivot model itself to respect Eloquence's enforceCamel rules. Do you know if that is possible? You can see in this response, the properties inside the pivot table are still snake cased.

http://cl.ly/image/0f2D0x463p0y

kirkbushell commented 10 years ago

Hi @bryantAXS!

So sorry I haven't seen this - I don't know why but I never seem to get notifications for my own projects, particularly the issues =\

Let me know if this is still an issue or whether you found a fix for it. I'll be happy to look into and resolve this for you, I just need a little more information.

My assumption is that because pivot tables are not actually models, that it would be skipping the camel case rule I've setup on the models - but perhaps there's a way we can work it out.

Again, apologies for the lateness of this reply - happy to help if you still need it!

kirkbushell commented 10 years ago

So after some investigation @bryantAXS I've got something in place now that I'm testing quite heavily (if you check out the 1.x branch you'll see the upcoming changes). Should have a proper release, along with a few other changes and features very soon.

kirkbushell commented 10 years ago

@bryantAXS this should now be resolved in 1.1. Let me know if you find any issues.