PostgresConnection::getSchemaBuilder()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 8
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 4
c 1
b 0
f 0
nc 1
nop 0
dl 0
loc 8
rs 10
1
<?php
2
3
namespace App\Database;
4
5
class PostgresConnection extends \Illuminate\Database\PostgresConnection
6
{
7
    public function getSchemaBuilder()
8
    {
9
        $builder = parent::getSchemaBuilder();
10
        $builder->blueprintResolver(function ($table, $callback) {
11
            return new Blueprint($table, $callback);
12
        });
13
14
        return $builder;
15
    }
16
17
    /**
18
     * Get the default schema grammar instance.
19
     *
20
     * @return \Illuminate\Database\Grammar
21
     */
22
    protected function getDefaultSchemaGrammar()
23
    {
24
        return $this->withTablePrefix(new PostgresGrammar);
25
    }
26
}
27