Guthaben aufladen, löschen, Ansichten

This commit is contained in:
Kevin Adametz 2021-04-26 16:07:03 +02:00
parent 6ac9fcc4d2
commit 3754f1c571
27 changed files with 603 additions and 89 deletions

View file

@ -167,6 +167,12 @@ class User extends Authenticatable
return $this->hasMany('App\Models\UserUpdateEmail', 'user_id', 'id');
}
public function user_pay_credits()
{
return $this->hasMany('App\Models\UserPayCredit', 'user_id', 'id')->orderBy('created_at', 'DESC');
}
public function getMUserSponsor(){
if($this->user_sponsor && $this->user_sponsor->account){
return $this->user_sponsor->account->first_name." ".$this->user_sponsor->account->last_name." | ".$this->user_sponsor->email;