Completed
Pull Request — master (#25)
by
unknown
07:33
created

CreateMenuItemsTable::up()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 18
Code Lines 16

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 16
c 1
b 0
f 0
nc 1
nop 0
dl 0
loc 18
rs 9.7333
1
<?php
2
3
use Illuminate\Database\Migrations\Migration;
4
use Illuminate\Database\Schema\Blueprint;
5
use Illuminate\Support\Facades\Schema;
6
7
class CreateMenuItemsTable extends Migration
8
{
9
    /**
10
     * Run the migrations.
11
     *
12
     * @return void
13
     */
14
    public function up()
15
    {
16
        Schema::create('menu_items', function (Blueprint $table) {
17
            $table->increments('id');
18
            $table->integer('menu_id');
19
            $table->string('title');
20
            $table->string('slug');
21
            $table->string('url')->nullable();
22
            $table->string('target')->default('_self');
23
            $table->integer('parent_id')->unsigned()->nullable();
24
            $table->integer('order')->unsigned()->default(0);
25
            $table->string('route')->nullable();
26
            $table->text('params')->nullable();
27
            $table->string('controller')->nullable();
28
            $table->string('middleware')->nullable();
29
            $table->string('icon')->nullable();
30
            $table->string('custom_class')->nullable();
31
            $table->timestamps();
32
        });
33
    }
34
35
    /**
36
     * Reverse the migrations.
37
     *
38
     * @return void
39
     */
40
    public function down()
41
    {
42
        Schema::dropIfExists('menu_items');
43
    }
44
}
45