perhaps the clue is that you have named your field Character_Id but in the code you are saying 'CharacterId'.. you dont really need that btw if your field is actually character_id (note the lower case)
shez1983 said:
perhaps the clue is that you have named your field Character_Id but in the code you are saying 'CharacterId'.. you dont really need that btw if your field is actually character_id (note the lower case)
Thank you for your reply, i'm sorry for the mistake i edited the post, the field name ios actually CharacterId not Character_Id
return $this->belongsTo('App\Guild', 'guild_members', 'CharacterId', 'GuildId');
is wrong... 'CharacterId', 'GuildId are not the same things but needs to be other way around..
The problem is your relationship.
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community