Files
cachet-docker/app/models/Incident.php
2014-11-19 12:02:51 +00:00

25 lines
471 B
PHP

<?php
class Incident extends Eloquent {
public function getHumanStatusAttribute() {
switch ($this->status) {
case 1: return 'Investigating';
case 2: return 'Identified';
case 3: return 'Watching';
case 4: return 'Fixed';
}
}
public function getLabelColorAttribute() {
switch ($this->status) {
case 1:
return 'label-warning';
case 2:
case 3:
return 'label-info';
case 4:
return 'label-success';
}
}
}