How to set auto increment column as a non primary key? [Laravel Tips]

This worked for me (it’s important to set an index for the autoincrement column)

Schema::table('table', function(Blueprint $t) {
    // Add the Auto-Increment column
    // auto increment needs to be an index (not necessarily primary)

    // Remove the primary key

    // Set the actual primary key

The original answer can be seen on StackOverflow