getDoctrineSchemaManager(); $pages = $sm->introspectTable('pages'); $books = $sm->introspectTable('books'); $chapters = $sm->introspectTable('chapters'); if ($pages->hasIndex('name_search')) { Schema::table('pages', function (Blueprint $table) { $table->dropIndex('name_search'); }); } if ($books->hasIndex('name_search')) { Schema::table('books', function (Blueprint $table) { $table->dropIndex('name_search'); }); } if ($chapters->hasIndex('name_search')) { Schema::table('chapters', function (Blueprint $table) { $table->dropIndex('name_search'); }); } } };