bigIncrements('id'); $table->bigInteger('parent_id')->unsigned()->index()->nullable(); $table->foreign('parent_id')->references('id')->on('menus')->onDelete('cascade'); // naming menu base on lang $table->string('menu_translate_key'); // usefull in front end for displaying list menu $table->boolean('is_master_menu')->default(0); $table->boolean('is_account_menu')->default(0); $table->boolean('is_setting_menu')->default(0); $table->string('index_vue_router_name')->nullable(); $table->string('icon_class_name'); // usefull in back end for checking permission role // in route api based on prefix $table->string('url_api_prefix')->nullable(); $table->integer('sequence'); $table->timestamps(); }); } /** * Reverse the migrations. * * @return void */ public function down() { Schema::dropIfExists('menus'); } }