Support the ongoing development of →
Database Eloquent
Last updated 10 months ago.

That's not a good way (comma separated values) to store data in the DB, as you're now discovering. In addition to being extremely hard to get data, it is next to impossible to accurately query it. You need to separate the relationships into separate tables:

characters -id -name

titles -id -name

character_title -character_id -title_id

Table character_title holds the many-to-many relationships between characters and titles. Then you simply setup your Laravel models following the examples at

Last updated 10 months ago.

Sign in to participate in this thread!


Your banner here too?

khaccounts khaccounts Joined 21 Apr 2014


We'd like to thank these amazing companies for supporting us

Your logo here?

The Laravel portal for problem solving, knowledge sharing and community building.

© 2023 - All rights reserved.