How to add index to an existing column in Laravel
If you want to add a new index to some columns in your existing table, you can do it pretty easily with Laravel migration. First, create the migration: Then edit the migration php file. In this example, we are adding two indexes to a table, parent_id and slug: