1234567891011121314151617181920212223242526272829303132333435363738394041 |
- <?php
- use Illuminate\Database\Migrations\Migration;
- use Illuminate\Database\Schema\Blueprint;
- use Illuminate\Support\Facades\Schema;
- class CreateMenusTable extends Migration
- {
- /**
- * Run the migrations.
- *
- * @return void
- */
- public function up()
- {
- Schema::create('menus', function (Blueprint $table) {
- $table->id();
- $table->integer('pid')->default(0);
- $table->string('name')->default('')->comment('名字');
- $table->string('path', 500)->default('')->comment('路径(URL)');
- $table->string('component', 500)->default('')->comment('vue文件路径');
- $table->string('redirect', 500)->default('')->comment('重定向');
- $table->text('meta')->comment('meta');
- $table->tinyInteger('hidden')->default(1)->comment('是否隐藏');
- $table->softDeletes();
- $table->timestamps();
- });
- }
- /**
- * Reverse the migrations.
- *
- * @return void
- */
- public function down()
- {
- Schema::dropIfExists('menus');
- }
- }
|