👁 查看:2026_06_30_194012_create_menu_items_table.php
路径:/home/boguraj1/.trash/database/migrations/2026_06_30_194012_create_menu_items_table.php
大小:1.02 KB · 修改:2026-07-23 16:13:46 · 权限:0644 · 可写
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateMenuItemsTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('menu_items', function (Blueprint $table) {
$table->id();
$table->string('label');
$table->string('url');
$table->string('route_name')->nullable();
$table->enum('location', ['header', 'footer_quick', 'footer_customer']);
$table->string('icon')->nullable();
$table->enum('target', ['_self', '_blank'])->default('_self');
$table->unsignedTinyInteger('sort_order')->default(0);
$table->boolean('is_enabled')->default(true);
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('menu_items');
}
}