Homeparty online, Cron SEPA

This commit is contained in:
Kevin Adametz 2021-04-23 14:54:09 +02:00
parent 13fb2cfe98
commit 36872100c6
41 changed files with 1140 additions and 189 deletions

View file

@ -120,6 +120,10 @@ class Homeparty extends Model
return $this->hasMany('App\Models\HomepartyUser', 'homeparty_id')->where('is_host', false);
}
public function homeparty_order_items(){
return $this->hasMany('App\Models\HomepartyUserOrderItem','homeparty_id');
}
public function getDateAttribute($value)
{

View file

@ -218,4 +218,12 @@ class UserAccount extends Model
return isset($this->notice[$key]) ? $this->notice[$key] : false;
}
public function getPhoneNumber(){
if($this->phone && $this->phone !== ""){
return ($this->pre_phone ? $this->pre_phone->phone : '')." ".$this->phone;
}
if($this->mobil && $this->mobil !== ""){
return ($this->pre_mobil ? $this->pre_mobil->phone : '')." ".$this->mobil;
}
}
}