![]() |
(09-13-2022, 06:27 PM)kenjis Wrote: I'm not sure your case works with CodeIgniter. I did find it after an hour of posting this, leaving this here in case someone else need it (mostly future me): // override the constructor of the specific model public function __construct(ConnectionInterface &$db = null, ValidationInterface $validation = null) { parent::__construct($db, $validation); // apply the extended controller's constructor $this->db->schema = 'schema_name'; // modify the specific property in this case the db schema } |
Messages In This Thread |
Call model instance with custom schema - by luckyDev - 09-12-2022, 10:54 PM
RE: Call model instance with custom schema - by kenjis - 09-13-2022, 06:27 PM
RE: Call model instance with custom schema - by luckyDev - 09-14-2022, 10:05 PM
|