CreateSettingsTable::__construct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 5
rs 9.4285
cc 1
eloc 3
nc 1
nop 0
1
<?php
2
3
use Arcanedev\Support\Bases\Migration;
4
use Illuminate\Database\Schema\Blueprint;
5
6
/**
7
 * Class     CreateSettingsTable
8
 *
9
 * @author   ARCANEDEV <[email protected]>
10
 */
11
class CreateSettingsTable extends Migration
12
{
13
    /* ------------------------------------------------------------------------------------------------
14
     |  Constructor
15
     | ------------------------------------------------------------------------------------------------
16
     */
17
    public function __construct()
18
    {
19
        $this->connection = config('settings.stores.database.connection');
20
        $this->table      = config('settings.stores.database.table');
21
    }
22
23
    /* ------------------------------------------------------------------------------------------------
24
     |  Main Functions
25
     | ------------------------------------------------------------------------------------------------
26
     */
27
    /**
28
     * Run the migrations.
29
     */
30
    public function up()
31
    {
32
        $this->createSchema(function(Blueprint $table) {
33
            $table->increments('id');
34
            $table->string('key')->index();
35
            $table->text('value');
36
        });
37
    }
38
}
39