xicond's avatar

Custom Morph

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)
0 likes
1 reply

Please or to participate in this conversation.