CreateCmsMenus   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 34
Duplicated Lines 0 %

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A down() 0 3 1
A up() 0 16 1
1
<?php
2
3
use Illuminate\Database\Migrations\Migration;
4
use Illuminate\Database\Schema\Blueprint;
5
6
class CreateCmsMenus extends Migration
7
{
8
    /**
9
     * Run the migrations.
10
     *
11
     * @return void
12
     */
13
    public function up()
14
    {
15
        Schema::create('cms_menus', function (Blueprint $table) {
16
            $table->increments('id');
17
            $table->string('name')->nullable();
18
            $table->string('type')->default('url');
19
            $table->string('path')->nullable();
20
            $table->string('color')->nullable();
21
            $table->string('icon')->nullable();
22
            $table->integer('parent_id')->nullable();
23
            $table->boolean('is_active')->default(1);
24
            $table->boolean('is_dashboard')->default(0);
25
            $table->integer('id_cms_privileges')->nullable();
26
            $table->integer('sorting')->nullable();
27
28
            $table->timestamps();
29
        });
30
    }
31
32
    /**
33
     * Reverse the migrations.
34
     *
35
     * @return void
36
     */
37
    public function down()
38
    {
39
        Schema::drop('cms_menus');
40
    }
41
}
42