jeudi 2 juin 2016

Error in query with whereRelation

I have a query

$matchCount[] = Match::whereRelation('seasonMatch.season', Season::getPK(), $season->getKey())
                            ->whereRealtionPK('teams', $team->getKey())
                            ->count();

when i run this query it gives me an error

"Call to undefined method Illuminate\Database\Query\Builder::seasonMatch()"

Anybody is here to help me out.



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire