Skip to content
Advertisement

Laravel 5.4 hasManyTrough ‘Call to undefined method IlluminateDatabaseQueryBuilder::hasManyTrough()’

I am struggling to see, where I went wrong. It seams easy, I followed Laravel instructions https://laravel.com/docs/5.4/eloquent-relationships#has-many-through , but clearly I need someone more familar with this sort of code as whenever I try to fetch $stagingsystem-stagesubtype I get error

BadMethodCallException with message ‘Call to undefined method >IlluminateDatabaseQueryBuilder::hasManyTrough()’

Can someone help?

StagingSystems

JavaScript

StageName

JavaScript

StageSubType

JavaScript

MODELS

StagingSystem

JavaScript

StageName

JavaScript

StageSubType

JavaScript

Advertisement

Answer

You have mistyped HasManyThrough as hasManyTrough.

User contributions licensed under: CC BY-SA
6 People found this is helpful
Advertisement