14 changed files with 153 additions and 27 deletions
-
16app/Entities/Projects/Issue.php
-
35app/Entities/Projects/Priority.php
-
6app/Http/Controllers/Issues/OptionController.php
-
29app/Http/Controllers/Projects/IssueController.php
-
11database/factories/IssueFactory.php
-
1database/migrations/2019_03_03_210017_create_issues_table.php
-
5resources/lang/de/issue.php
-
6resources/lang/en/issue.php
-
5resources/lang/id/issue.php
-
1resources/views/projects/issues/create.blade.php
-
2resources/views/projects/issues/index.blade.php
-
3resources/views/projects/issues/show.blade.php
-
42tests/Feature/Projects/ProjectIssuesTest.php
-
18tests/Unit/Models/IssueTest.php
@ -0,0 +1,35 @@ |
|||
<?php |
|||
|
|||
namespace App\Entities\Projects; |
|||
|
|||
use App\Entities\ReferenceAbstract; |
|||
|
|||
class Priority extends ReferenceAbstract |
|||
{ |
|||
protected static $lists = [ |
|||
1 => 'minor', |
|||
2 => 'major', |
|||
3 => 'critical', |
|||
]; |
|||
|
|||
protected static $colors = [ |
|||
1 => 'info', |
|||
2 => 'warning', |
|||
3 => 'danger', |
|||
]; |
|||
|
|||
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; |
|||
} |
|||
} |
|||
Write
Preview
Loading…
Cancel
Save
Reference in new issue