I declared relationship between two table.. one to many... but when I tried to load data the declared relationship is not viewed in the view console..
I have this in GL
public function parent_gl_sle(){
return $this->belongsTo('App\Sle_type','GLControlSLE_CODE','SLE_TypeCode');
}
then this is my SL
public function child_gl_sle(){
return $this->hasMany('App\Glcontrol','GLControlSLE_CODE','SLE_TypeCode');
}
Then, this is my controller.
$gl = Glcontrol::where('GLControlBR_CODE',$brcode)
->with('parent_glcontrol_br')
->with('parent_gl_sle')
->with('parent_cts')
->with('parent_coa')
->get();
But in my console parent_gl_sle
is not included in the console.
What did I missed?