Start of echomail subscribing

This commit is contained in:
Deon George
2021-08-25 22:13:49 +10:00
parent 97384ce3a0
commit 8306f4c3a3
8 changed files with 403 additions and 186 deletions

View File

@@ -72,6 +72,14 @@ class System extends Model
/* METHODS */
public function echoareas()
{
return Echoarea::select('echoareas.*')
->join('address_echoarea',['address_echoarea.echoarea_id'=>'echoareas.id'])
->join('addresses',['addresses.id'=>'address_echoarea.address_id'])
->where('addresses.system_id',$this->id);
}
/**
* Return the system's address in the same zone
*