mercredi 24 janvier 2018

Can I get attributes of model in relation?

For example in model Post, I have such relation:

public function voters()
{
     return $this->morphMany(Voter::class, 'entity');
}

Can I get attributes and fields of post entity from which I get voters?



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire