You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I would like to setup a relationship that returns allTenants() for a relationship. Is there a way to do that?
public function holidays() {
// Correctly returns tenant scoped Holidays
return $this->hasMany('Holidays');
}
public function allHolidays() {
// Want all holidays not scoped
return $this->hasMany('Holidays')->allTenants();
// Fails as allTenants() needs to be called statically
}
Also tried
public function allHolidays() {
// Want all holidays not scoped
Holidays::allTenants();
return $this->hasMany('Holidays');
// No error but holidays are still scoped
}
I don't want to Tenant::disable() as I do still want everything else scoped.
The text was updated successfully, but these errors were encountered:
I would like to setup a relationship that returns allTenants() for a relationship. Is there a way to do that?
Also tried
I don't want to
Tenant::disable()
as I do still want everything else scoped.The text was updated successfully, but these errors were encountered: