Removed many redundant functions from User::class
This commit is contained in:
@@ -131,24 +131,6 @@ class Account extends Model implements IDs
|
||||
return sprintf('<span class="btn-sm btn-block btn-%s text-center">%s</span>',$this->active ? 'success' : 'danger',$this->active ? 'Active' : 'Inactive');
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated use getAIDAttribute()
|
||||
*/
|
||||
public function getAccountIdAttribute()
|
||||
{
|
||||
abort(500,'deprecated');
|
||||
return $this->getAIDAttribute();
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated use getUrlAdminAttribute()
|
||||
*/
|
||||
public function getAccountIdUrlAttribute()
|
||||
{
|
||||
abort(500,'deprecated');
|
||||
return $this->getUrlAdminAttribute();
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the address for the account
|
||||
*
|
||||
@@ -163,17 +145,6 @@ class Account extends Model implements IDs
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the Account Unique Identifier
|
||||
* @return string
|
||||
* @deprecated use getSIDAttribute()
|
||||
*/
|
||||
public function getAIDAttribute()
|
||||
{
|
||||
abort(500,'deprecated');
|
||||
return $this->getSIDAttribute();
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the account name
|
||||
*
|
||||
@@ -181,19 +152,7 @@ class Account extends Model implements IDs
|
||||
*/
|
||||
public function getNameAttribute(): string
|
||||
{
|
||||
return $this->company ?: ($this->user_id ? $this->user->SurFirstName : 'AID:'.$this->id);
|
||||
}
|
||||
|
||||
public function getServicesCountHtmlAttribute()
|
||||
{
|
||||
abort(500,'deprecated');
|
||||
return sprintf('%s <small>/%s</small>',$this->services()->noEagerLoads()->where('active',TRUE)->count(),$this->services()->noEagerLoads()->count());
|
||||
}
|
||||
|
||||
public function getSwitchUrlAttribute()
|
||||
{
|
||||
abort(500,'deprecated');
|
||||
return sprintf('<a href="/r/switch/start/%s"><i class="fas fa-external-link-alt"></i></a>',$this->user_id);
|
||||
return $this->company ?: ($this->user_id ? $this->user->getSurFirstNameAttribute() : 'LID:'.$this->id);
|
||||
}
|
||||
|
||||
public function getTypeAttribute()
|
||||
@@ -205,6 +164,7 @@ class Account extends Model implements IDs
|
||||
* Return the Admin URL to manage the account
|
||||
*
|
||||
* @return string
|
||||
* @deprecated
|
||||
*/
|
||||
public function getUrlAdminAttribute(): string
|
||||
{
|
||||
@@ -216,6 +176,7 @@ class Account extends Model implements IDs
|
||||
* Return the User URL to manage the account
|
||||
*
|
||||
* @return string
|
||||
* @deprecated
|
||||
*/
|
||||
public function getUrlUserAttribute(): string
|
||||
{
|
||||
|
Reference in New Issue
Block a user