you can use the following in your models
protected $table = 'example';
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
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".
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community