Support the ongoing development of Laravel.io →
posted 10 years ago
Database
Last updated 2 years ago.
0

you can use the following in your models

protected $table = 'example';
Last updated 2 years ago.
0

No, i do not want that. I have a certain table structure [some rows] that other people do not, and when i give the script to others, i want them to configurate their own table structure. Maybe via config file, with an array like this

'enable' => true,
'table' => 'Accounts'
//rows
//Row name, label to be used in pages
'Name' => 'Username'
'Level' => 'Level'

My question is how do i draw the data from the config, and how do i use it to build a query

Last updated 2 years ago.
0

Changing table structure means changing repositories, models, controllers, views and other related parts... aka changing project itself, even changing the idea behind the project.

What you need is "The basics of good database design".

Last updated 2 years ago.
0

Sign in to participate in this thread!

Eventy

Your banner here too?

Joe96 joe96 Joined 28 Apr 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.

© 2024 Laravel.io - All rights reserved.