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