diff --git a/app/Models/Component.php b/app/Models/Component.php index 38375e8a..84a712b8 100644 --- a/app/Models/Component.php +++ b/app/Models/Component.php @@ -157,16 +157,6 @@ class Component extends Model implements HasPresenter return $query->where('enabled', false); } - /** - * Looks up the human readable version of the status. - * - * @return string - */ - public function getHumanStatusAttribute() - { - return trans('cachet.components.status.'.$this->status); - } - /** * Returns all of the tags on this component. * diff --git a/app/Presenters/ComponentPresenter.php b/app/Presenters/ComponentPresenter.php index 03cad6cf..3fbb686c 100644 --- a/app/Presenters/ComponentPresenter.php +++ b/app/Presenters/ComponentPresenter.php @@ -32,6 +32,16 @@ class ComponentPresenter extends AbstractPresenter } } + /** + * Looks up the human readable version of the status. + * + * @return string + */ + public function human_status() + { + return trans('cachet.components.status.'.$this->wrappedObject->status); + } + /** * Convert the presenter instance to an array. * @@ -42,7 +52,7 @@ class ComponentPresenter extends AbstractPresenter return array_merge($this->wrappedObject->toArray(), [ 'created_at' => $this->created_at(), 'updated_at' => $this->updated_at(), - 'status_name' => $this->wrappedObject->humanStatus, + 'status_name' => $this->human_status(), ]); } } diff --git a/resources/views/dashboard/components/index.blade.php b/resources/views/dashboard/components/index.blade.php index cfd3abee..9fd4a7d9 100644 --- a/resources/views/dashboard/components/index.blade.php +++ b/resources/views/dashboard/components/index.blade.php @@ -25,7 +25,7 @@ @if($components->count() > 1) @endif - {{ $component->name }} {{ $component->humanStatus }} + {{ $component->name }} {{ $component->human_status }} @if($component->group)
{{ trans('dashboard.components.listed_group', ['name' => $component->group->name]) }}
diff --git a/resources/views/incident.blade.php b/resources/views/incident.blade.php index eb80a5d1..6b2c8c72 100644 --- a/resources/views/incident.blade.php +++ b/resources/views/incident.blade.php @@ -14,7 +14,7 @@