Welcome Guest, Not a member yet? Register   Sign In
Entities and pivots
#2

FWIW I ended up going with the same general idea of what I did in CI3 - my Entity has a "getWidgets()" function that returns an array of the IDs from the pivot table, which can be used as-is or with the Widget model to get the full object. This makes it very convenient to reference "$user->widgets" without needing to load the widget model in my controller.
Reply


Messages In This Thread
Entities and pivots - by MGatner - 03-08-2019, 12:39 PM
RE: Entities and pivots - by MGatner - 03-10-2019, 10:26 AM
RE: Entities and pivots - by MGatner - 03-27-2019, 04:40 PM
RE: Entities and pivots - by kilishan - 03-27-2019, 07:17 PM
RE: Entities and pivots - by MGatner - 03-28-2019, 04:59 AM
RE: Entities and pivots - by MGatner - 04-12-2019, 06:41 PM



Theme © iAndrew 2016 - Forum software by © MyBB