This forum has moved to a new location and is in read-only mode. Please visit talk.octobercms.com to access the new location.
Hi all,
I have been working on a library system and I have difficulties in setting up a reverse hasmanythrough relations as follow:
I have these two entity: Book Model, CD Model
and each entity is "iteamble" to Item Model for inventory management
and Item Model hasmany "Checkout" as checkout is a record for user checkout the book
Here is the problem, I can setup a partial to view the bookname using $checkout->item->itemable->name, but this is not a good practice as I cannot filter / search by partial. May I know if it is possible to setup hasmanythrough relations with this DB structure?
Thanks all in advance
Okay, currently I wrote a scope filter to do the filtering work, maybe a solution to others.
1-3 of 3