hasMany($related, 'service_id');
}
public function getExtraField($key)
{
$value = '';
$setting = $this->extraFieldRelation()->where('key', $key)->first();
if ($setting) {
$value = $setting->value;
}
return $value;
}
public function getName()
{
$name = $this->attributes['name'];
$id = $this->attributes['id'];
$html = ''.$name.'';
return $html;
}
public function getStatus()
{
$status = $this->attributes['status'];
$html = "Inactive";
if ($status == 1) {
$html = "Active";
}
return $html;
}
public function getAction()
{
$id = $this->attributes['id'];
$status = $this->attributes['status'];
$html = 'Activate";
if ($status == 1) {
$html = "Activate";
}
return $html;
}
public function isActivate()
{
$check = true;
$settings = $this->extraFieldRelation()->get();
if ($settings->count() == 0) {
$check = false;
}
return $check;
}
}