From e9895aee4579fa8ee9f90d46791d819c51e53cae Mon Sep 17 00:00:00 2001 From: Deon George Date: Fri, 26 Apr 2024 16:21:58 +1000 Subject: [PATCH] Added Echoarea::addresses_active() to find addresses that are connected to the area, and active --- app/Models/Echoarea.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/app/Models/Echoarea.php b/app/Models/Echoarea.php index 29a49eb..5434ec8 100644 --- a/app/Models/Echoarea.php +++ b/app/Models/Echoarea.php @@ -56,6 +56,12 @@ class Echoarea extends Model return $this->belongsToMany(Address::class); } + public function addresses_active() + { + return $this->belongsToMany(Address::class) + ->activeFTN(); + } + public function domain() { return $this->belongsTo(Domain::class);