create("form_input", function (Blueprint $table) { $table->id("id"); $table->unsignedBigInteger('form_id'); $table->unsignedBigInteger('input_type_id'); $table->string('label'); $table->string('name'); $table->text('params'); $table->integer(11)->default(1); $table->timestamps(); $table->index('form_id'); $table->index('input_type_id'); $table->foreign('form_id', 'fk_form_input_form')->references('id')->on('form'); $table->foreign('input_type_id', 'fk_form_input_input_type')->references('id')->on('input_type'); }); } public static function down(): void { Illuminate\Database\Capsule\Manager::schema()->drop("form_input"); } }