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.



from Newest questions tagged laravel-5 - Stack Overflow http://ift.tt/1Y4ja6p
via IFTTT

Aucun commentaire:

Enregistrer un commentaire