0
good night!! I’m trying to launch data report(groups and networks) but it doesn’t work...the group model is like this:
function Redes(){
return $this->hasMany('App\rede','grupo_id','id');
}
in the network model is like this:
class rede extends Model
{
protected $table = "redes";
}
I’m trying to display the data like this:
Function Index(groups $groups, network $network){
$lista = $grupos->all();
foreach($lista as $li):
foreach($li->Redes() as $d):
print_r($d->id);
endforeach;
endforeach;
}
And nothing, what’s wrong? Thank you for your constant attention!!!
It wouldn’t just be
$li->Redes
?– Woss
Anderson...truth!! I always forget...man, thank you very much!!! thanks even!!!!!
– Horacio Neto