Or could it be that foreign key on 'players' table has to be named differently (dbnation_id ? )?
You need to do it as follows:
class Player extends Eloquent {
public function dbnation()
{
return $this->belongsTo('DbNation', 'nation_id');
}
}
The second parameter in the "belongsTo" function will define the local key for the relationship.
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community