Support the ongoing development of Laravel.io →
posted 10 years ago
Eloquent

I want to have an array of strings as a public member of my Word class (let's call it examples), and map it with Eloquent to the database somehow. For sure, in the database that would be two tables, but do I really need two classes with hasMany relationship, or there is any kind of 'normal' way to map array of strings to the database without creation additional class that I don't really need?

Last updated 3 years ago.
0

Sign in to participate in this thread!

Eventy

Your banner here too?

dsamoylov dsamoylov Joined 11 Nov 2014

Moderators

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

Your logo here?

Laravel.io

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

© 2025 Laravel.io - All rights reserved.