Rework address roles, making Address::role optional, rework determining uplink/downlinks/parent/children
This commit is contained in:
@@ -101,9 +101,8 @@ class User extends Authenticatable implements MustVerifyEmail
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the zones that this user is ZC for
|
||||
*
|
||||
* @return Collection
|
||||
* @deprecated not used - but if it is, probably could use Address::points()?
|
||||
*/
|
||||
public function points(): Collection
|
||||
{
|
||||
@@ -122,8 +121,8 @@ class User extends Authenticatable implements MustVerifyEmail
|
||||
*/
|
||||
public function zc(): Collection
|
||||
{
|
||||
$this->load('systems.addresses');
|
||||
$this->load('systems.addresses.nodes_hub');
|
||||
|
||||
return $this->systems->pluck('addresses')->flatten()->where('role',Address::NODE_ZC);
|
||||
return $this->systems->pluck('addresses')->flatten()->where('role_id',Address::NODE_ZC);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user