Using morphTo() on services, added Ezypay payment Import

This commit is contained in:
Deon George
2019-06-07 16:54:27 +10:00
parent 41d6a07196
commit 253eb55c19
33 changed files with 11398 additions and 183 deletions

View File

@@ -21,9 +21,14 @@ class Product extends Model
return $this->hasMany(Service::class);
}
/**
* Get the service category (from the product)
*
* @return string
*/
public function getCategoryAttribute()
{
return $this->prod_plugin_file;
return $this->prod_plugin_file ?: 'Other';
}
public function getContractTermAttribute()