CreateFirewallLogsTable   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 35
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 3

Importance

Changes 0
Metric Value
wmc 2
lcom 0
cbo 3
dl 0
loc 35
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A up() 0 17 1
A down() 0 4 1
1
<?php
2
3
use Illuminate\Database\Migrations\Migration;
4
use Illuminate\Database\Schema\Blueprint;
5
6
class CreateFirewallLogsTable extends Migration
7
{
8
    /**
9
     * Run the migrations.
10
     *
11
     * @return void
12
     */
13
    public function up()
14
    {
15
        Schema::create('firewall_logs', function (Blueprint $table) {
16
            $table->increments('id');
17
            $table->string('ip');
18
            $table->string('level')->default('medium');
19
            $table->string('middleware');
20
            $table->integer('user_id')->nullable();
21
            $table->string('url')->nullable();
22
            $table->string('referrer')->nullable();
23
            $table->text('request')->nullable();
24
            $table->timestamps();
25
            $table->softDeletes();
26
            
27
            $table->index('ip');
28
        });
29
    }
30
31
    /**
32
     * Reverse the migrations.
33
     *
34
     * @return void
35
     */
36
    public function down()
37
    {
38
        Schema::drop('firewall_logs');
39
    }
40
}
41