main system
This commit is contained in:
parent
0baac018a2
commit
a96d7d5c77
115 changed files with 4589 additions and 557 deletions
|
|
@ -9,6 +9,7 @@ use Illuminate\Notifications\Notifiable;
|
|||
use Illuminate\Contracts\Auth\MustVerifyEmail;
|
||||
use Illuminate\Foundation\Auth\User as Authenticatable;
|
||||
use Illuminate\Support\Facades\Mail;
|
||||
use Util;
|
||||
|
||||
/**
|
||||
* App\User
|
||||
|
|
@ -251,13 +252,13 @@ class User extends Authenticatable
|
|||
|
||||
public function isRenewalAccount(){
|
||||
if ($this->payment_account) {
|
||||
return Carbon::parse($this->payment_account)->modify('-'.(config('mivita.renewal_days')+1).' days')->lt(Carbon::now());
|
||||
return Carbon::parse($this->payment_account)->modify('-'.(config('main.renewal_days')+1).' days')->lt(Carbon::now());
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public function nextRenewalAccount(){
|
||||
return $this->payment_account ? Carbon::parse($this->payment_account)->modify('-'.config('mivita.renewal_days').' days')->format(\Util::formatDateTimeDB()) : false ;
|
||||
return $this->payment_account ? Carbon::parse($this->payment_account)->modify('-'.config('main.renewal_days').' days')->format(\Util::formatDateTimeDB()) : false ;
|
||||
}
|
||||
|
||||
public function daysActiveAccount(){
|
||||
|
|
@ -332,6 +333,10 @@ class User extends Authenticatable
|
|||
return Carbon::parse($this->attributes['release_account'])->format(\Util::formatDateTimeDB());
|
||||
}
|
||||
|
||||
public function getFormattedPaymentCredit()
|
||||
{
|
||||
return isset($this->attributes['payment_credit']) ? Util::formatNumber($this->attributes['payment_credit']) : "0";
|
||||
}
|
||||
|
||||
public function setSetting(array $revisions, bool $save = true){
|
||||
if(!$this->settings){
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue