Support the ongoing development of Laravel.io →
Database Eloquent

I have 3 tables: stores, settingkeys and settings.

The 'stores' table stores the store names (and other things).

The 'settingkeys' table stores attributes (name, facebook_link, twitter_link, address, etc...)

The 'settings' table stores settings values for each store ('MegaStore','www.fb.com/megastore','www.twitter.com/megastore','Street XXXX, 345', 'etc...');

I want to get setting values for a Store using a key from settingkeys table like this:

$store->settings('name'); // Return MegaStore
Last updated 3 years ago.
0

Sign in to participate in this thread!

Eventy

Your banner here too?

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.