Conditions | 2 |
Paths | 2 |
Total Lines | 12 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
38 | public function listForEloquent(string $class) : array |
||
39 | { |
||
40 | $list = []; |
||
41 | $table = (new $class)->getTable(); |
||
42 | $columns = Schema::getColumnListing($table); |
||
43 | |||
44 | foreach ($columns as $column) { |
||
45 | $type = Schema::getColumnType($table, $column); |
||
46 | $list[$column] = $this->typesMap[$type] ?? null; |
||
47 | } |
||
48 | |||
49 | return $list; |
||
50 | } |
||
52 |