| 1234567891011121314151617181920212223242526272829303132333435363738 |
- <?php
- use Illuminate\Support\Facades\Schema;
- use Illuminate\Database\Schema\Blueprint;
- use Illuminate\Database\Migrations\Migration;
- class CreateNavs extends Migration
- {
- /**
- * Run the migrations.
- *
- * @return void
- */
- public function up()
- {
- Schema::create('dc_navs', function (Blueprint $table) {
- $table->increments('id');
- $table->char('name',50)->comment('菜单名称');
- $table->char('icon',50)->comment('菜单图标')->default('')->nullable();
- $table->char('href',250)->comment('菜单地址')->nullable();
- $table->tinyInteger('type')->comment('菜单类型,0-左侧菜单,1-顶部菜单')->default('0')->nullable();
- $table->integer('sort')->comment('排序')->default('0')->nullable();
- $table->integer('parent_id')->comment('父级id')->default('0')->nullable();
- $table->tinyInteger('target')->comment('打开方式,0=内打开,1=外部打开')->default(0);
- $table->timestamps();
- });
- }
- /**
- * Reverse the migrations.
- *
- * @return void
- */
- public function down()
- {
- Schema::dropIfExists('dc_navs');
- }
- }
|