I am working on a project which is developed in Codeigniter with SparkActiveRecords. I need SparkActiveRecords to execute on the tables where Table prefix will pass based on the user login. Each user will have predefined table prefixes. On login, Active Records should use tables with the dynamically allocated prefix.
How we can achieve this and how we can pass table prefix on Active records?
class Zone extends ActiveRecord\Model { public static $table_name = 'zarest_zones'; }
this is Active recodes model for the table. I want to pass a table Prefix dynamically