CreateGroupsTable   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 27
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 8
c 1
b 0
f 0
dl 0
loc 27
rs 10
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A up() 0 10 1
A down() 0 3 1
1
<?php
2
3
use Illuminate\Support\Facades\Schema;
4
use Illuminate\Support\Facades\Artisan;
5
use Illuminate\Database\Schema\Blueprint;
6
use Illuminate\Database\Migrations\Migration;
7
8
class CreateGroupsTable extends Migration
9
{
10
    /**
11
     * Run the migrations.
12
     *
13
     * @return void
14
     */
15
    public function up()
16
    {
17
        Schema::create('groups', function (Blueprint $table) {
18
            $table->id();
19
            $table->string('name');
20
            $table->integer('type')->default(1);
21
            $table->timestamps();
22
        });
23
24
        Artisan::call('make:permission Group --all');
25
    }
26
27
    /**
28
     * Reverse the migrations.
29
     *
30
     * @return void
31
     */
32
    public function down()
33
    {
34
        Schema::dropIfExists('groups');
35
    }
36
}
37