id(); // name $table->string('name')->index(); // type $table->string('type')->index(); $table->timestamps(); }); // if env is local if (env('APP_ENV') == 'local') { $module = [ 'name' => 'Example Model', 'type' => 'test', ]; Module::create($module); } } /** * Reverse the migrations. * * @return void */ public function down() { Schema::dropIfExists('modules'); } };