Completed
Push — master ( 481865...ed4291 )
by John
24s queued 10s
created

JudgeServerModel   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 11
Duplicated Lines 0 %

Importance

Changes 2
Bugs 0 Features 2
Metric Value
eloc 7
c 2
b 0
f 2
dl 0
loc 11
rs 10
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A column() 0 3 1
1
<?php
2
3
namespace App\Models\Eloquent;
4
5
use Illuminate\Database\Eloquent\Model;
6
use Illuminate\Support\Facades\DB;
7
8
class JudgeServerModel extends Model
9
{
10
    protected $table='judge_server';
11
    protected $primaryKey='jsid';
12
    const DELETED_AT=null;
13
    const UPDATED_AT=null;
14
    const CREATED_AT=null;
15
16
    public static function column($key)
17
    {
18
        return Self::groupBy($key)->whereNotNull($key)->pluck($key)->toArray();
19
    }
20
}
21