You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

39 lines
771 B

<?php
namespace App\Entities\Projects;
use App\Entities\ReferenceAbstract;
class IssueStatus extends ReferenceAbstract
{
protected static $lists = [
0 => 'open',
1 => 'resolved',
2 => 'closed',
3 => 'on_hold',
4 => 'invalid',
];
protected static $colors = [
0 => 'yellow',
1 => 'green',
2 => 'primary',
3 => 'default',
4 => 'warning',
];
public static function getNameById($singleId)
{
return trans('issue.'.static::getById($singleId));
}
public static function toArray()
{
$lists = [];
foreach (static::$lists as $key => $value) {
$lists[$key] = trans('issue.'.$value);
}
return $lists;
}
}