id(); $table->timestamps(6); $table->foreignId('parent_id') ->nullable() ->constrained('categories') ->onUpdate('cascade') ->onDelete('cascade'); $table->string('name'); }); } /** * Reverse the migrations. */ public function down() { Schema::dropIfExists('categories'); } };