Passed
Push — master ( ab23d3...456c2a )
by Ferry
05:06
created

SchemaHelper   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 6
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 3
c 1
b 0
f 0
dl 0
loc 6
rs 10
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A hasColumn() 0 4 1
1
<?php
2
/**
3
 * Created by PhpStorm.
4
 * User: User
5
 * Date: 8/16/2019
6
 * Time: 12:09 AM
7
 */
8
9
namespace crocodicstudio\crudbooster\helpers;
10
11
use Illuminate\Support\Facades\Cache;
12
use Illuminate\Support\Facades\Schema;
13
14
class SchemaHelper
15
{
16
    public static function hasColumn($table, $column)
17
    {
18
        $columns = cb()->listAllColumns($table);
19
        return in_array($column,$columns);
20
    }
21
}