name = "invites"; $setting->description = "Enabled Invites"; $setting->typ = "checkbox"; $setting->value = 1; $setting->saveOrFail(); Schema::create('invites', function (Blueprint $table) { $table->increments('id'); $table->timestamps(); $table->string('username')->nullable()->default(null)->comment("If set the username can't be changed"); $table->string("user_id")->comment("User who create the invite"); $table->string("code")->comment("Invite code"); $table->string("comment")->nullable()->default(null); $table->enum("status", ["active", "inaktive", "used"])->default("active"); }); } /** * Reverse the migrations. * * @return void */ public function down() { $s = \App\Models\Setting::query()->where("name", "=", "invites")->first(); $s->delete(); Schema::drop('invites'); } }