i have another issue. I have a Country model:
protected $fillable = [
'code', 'latitude', 'longitude', 'currency_id', 'timezone', 'dam_date', 'status',
];
public function neighbors() {
return $this->belongsToMany('App\Models\Country', 'country_country_relation', 'country_id_1', 'country_id_2');
}
I want to show the neighbors of some country. Unfortunately neighbors() works only in one direction.
Example: If i add Austria as neighbor country of Germany, when i look the Germany page i see Austria, but when i see the Austria page i don't find Germany as neighbor. What should i change to make this thing possible ?