i'm using codeigniter website project. when include model, work long no function implemented (except constructor).
this configuration works:
class xyz_model extends ci_model { function __construct() { } } this doesn't:
class xyz_model extends ci_model { function __construct() { } public function get_xyz() { return [ "xy" => ["xy"], "yz" => ["xy"], "zz" => ["xy","zx","zy"] ]; } } there not database access... , have no clue why not working.
you extending core model class, child's constructor being used in placed of parents:
parent::__construct(); add models constructor.
Comments
Post a Comment