Pivot Table Column Name Override Issue With Voyager

Posted 1 week ago by potentdevelopment

Hello,

In my model, I have blongsToMany setup as this:

return $this->belongsToMany('App\Community', 'community_model', 'community_id', 'model_id');

I've setup a belongs to many relationship in Voyager and when I try to add data, I get an error saying that models_id is not found in the database. It seems Voyager is still trying to go by default naming convention instead of using the override. Any solutions to this?

Please sign in or create an account to participate in this conversation.