I got the array of column name using Schema::getColumnListing('machines')
Schema::getColumnListing('machines')
But the order of columns is not same as in the database(mysql) table.
I searched about order by 'ordinal_postion' but I am not sure where and how to use it.