There's no way of defining a 3-way relationship. You can relate just 2 models and the 3rd one as part of the pivot table.
// App/Group.php
public function subscribers() {
return $this->belongsToMany(App\Subscriber::class)->withPivot('status_id');
}
public function statuses() {
return $this->belongsToMany(App\Status::class)->withPivot('subscriber_id');
}
// App/Subscriber.php
public function groups() {
return $this->belongsToMany(App\Group::class)->withPivot('status_id');
}
public function statuses() {
return $this->belongsToMany(App\Status::class)->withPivot('group_id');
}
// App/Status.php
public function groups() {
return $this->belongsToMany(App\Group::class)->withPivot('subscriber_id');
}
public function subscribers() {
return $this->belongsToMany(App\Subscriber::class)->withPivot('group_id');
}