Is there a built-in way to get teams that are not the currentTeam? I've looked through the code and the issues but couldn't find anything. Right now I have my own solution:
# User.php
public function otherTeams()
{
if (is_null($this->currentTeam)) return $this->teams;
$otherTeams = $this->teams->reject(function ($team) {
return $team->getKey() == $this->currentTeam->getKey();
});
return $otherTeams;
}
This seems to work, but if there's already a way to do this I obviously would use that 😄
Is there a built-in way to get teams that are not the
currentTeam
? I've looked through the code and the issues but couldn't find anything. Right now I have my own solution:This seems to work, but if there's already a way to do this I obviously would use that 😄
Best regards, Robert