Optimising product category and category names

This commit is contained in:
Deon George
2022-06-12 11:21:20 +10:00
parent 360c1e46a1
commit cc94426902
36 changed files with 269 additions and 156 deletions

View File

@@ -149,6 +149,11 @@ class Account extends Model implements IDs
return $this->company ?: ($this->user_id ? $this->user->getSurFirstNameAttribute() : 'LID:'.$this->id);
}
/**
* Return the type of account this is - if it has a company name, then its a business account.
*
* @return string
*/
public function getTypeAttribute()
{
return $this->company ? 'Business' : 'Private';