Welcome Guest, Not a member yet? Register   Sign In
Eloquent cannot find Code Igniter Model
#1

[eluser]coderego[/eluser]
So I am using Eloquent with code igniter and getting some interesting bugs.
Code:
class Brand_model extends MY_Model {


public function size()
{
    return $this->hasOne('Size');
}
}
That line errors when trying to load my Size model:

Code:
class Size extends  MY_Model {

    public function brand(){
        return $this->belongsTo('Brand');

    }


}
"Unable to find class Size"

Any ideas?
#2

[eluser]jmadsen[/eluser]
Are you actually loading class "Size" anywhere?




Theme © iAndrew 2016 - Forum software by © MyBB