Level 41
Maybe custom polymorphic types are what you want.
I want define morphing but the types are not model name because of existing data migrated? I only want to be readonly, no need write I want to use it in whereHasMorph, any idea ?
posts
id - integer
title - string
body - text
videos
id - integer
title - string
url - string
comments
id - integer
body - text
ref_id - integer (id morph)
type - string (video, post)
Maybe custom polymorphic types are what you want.
Please or to participate in this conversation.