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.
 
 
 
 
 

37 lines
724 B

<?php
namespace App\Entities\Projects;
use App\Entities\ReferenceAbstract;
class Status extends ReferenceAbstract
{
protected static $lists = [
1 => 'planned',
2 => 'progress',
3 => 'done',
4 => 'closed',
5 => 'canceled',
6 => 'on_hold',
];
public static function getNameById($singleId)
{
return trans('project.'.static::$lists[$singleId]);
}
public static function toArray()
{
$lists = [];
foreach (static::$lists as $key => $value) {
$lists[$key] = trans('project.'.$value);
}
return $lists;
}
public static function all()
{
return collect($this->toArray());
}
}