codeigniter - Eloquent cannot find Code Igniter Model -
so using eloquent code igniter , getting interesting bugs.
class brand_model extends my_model { public function size() { return $this->hasone('size'); } }
that line errors when trying load size model:
class size extends my_model { public function brand(){ return $this->belongsto('brand'); } }
"unable find class size"
any ideas?
you can try adding autoload part, composer.json file, here: http://snipr.it/~dh
then tun php composer.phar dumpautoload, load models specified directories
after this, classes should found.
other option $this->load->model('brand_model'); $this->load->model('size');
try both, hope helps!
Comments
Post a Comment