You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Some of my models extend from other models in order to apply scopes, but they all point back to the same table.
Images are not loaded when the model namespace is different from the one in model_type
Anyway to make it more flexible? I was thinking:
Allow a definable key to match the stored model_type (unsure if Laravel allows this). The default for this definable key is assigned the model namespace which makes it backward compatible
As I make collection_name unique to each table-field-collection, maybe media() can be made pull in the records matching model_id and collection_name without needing model_type?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Some of my models extend from other models in order to apply scopes, but they all point back to the same table.
Images are not loaded when the model namespace is different from the one in
model_type
Anyway to make it more flexible? I was thinking:
model_type
(unsure if Laravel allows this). The default for this definable key is assigned the model namespace which makes it backward compatiblecollection_name
unique to each table-field-collection, maybemedia()
can be made pull in the records matchingmodel_id
andcollection_name
without needingmodel_type
?Beta Was this translation helpful? Give feedback.
All reactions