CreateCmsMenus::down()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
eloc 1
dl 0
loc 3
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
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