Total Complexity | 2 |
Total Lines | 35 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 1 |
1 | <?php |
||
6 | class CreateCmsMenusTable 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 | { |
||
17 | $table->increments('id'); |
||
18 | $table->string('name', 30)->nullable(); |
||
19 | $table->string('type', 30)->default('url'); |
||
20 | $table->string('path', 50)->nullable(); |
||
21 | $table->string('color', 30)->nullable(); |
||
22 | $table->string('icon', 30)->nullable(); |
||
23 | $table->integer('parent_id')->nullable(); |
||
24 | $table->boolean('is_active')->default(1); |
||
25 | $table->boolean('is_dashboard')->default(0); |
||
26 | $table->integer('sorting')->nullable(); |
||
27 | $table->timestamps(); |
||
28 | $table->text('cms_privileges', 65535)->nullable(); |
||
29 | }); |
||
30 | } |
||
31 | |||
32 | |||
33 | /** |
||
34 | * Reverse the migrations. |
||
35 | * |
||
36 | * @return void |
||
37 | */ |
||
38 | public function down() |
||
39 | { |
||
40 | Schema::drop('cms_menus'); |
||
41 | } |
||
44 |