getTable(); foreach (Relation::$morphMap as $alias => $class) { Db::table($table)->where('model_type', $class)->update(['model_type' => $alias]); } } public function down() { $table = (new Attribute())->getTable(); foreach (Relation::$morphMap as $alias => $class) { Db::table($table)->where('model_type', $alias)->update(['model_type' => $class]); } } }