Simply specify the key name when creating it (with the second argument for primary
).
$table->primary(['column_1', 'column_2', 'column_3'], 'my_long_table_primary');
Next,
If you have error like You have an error in your SQL syntax ...
after this modification please make sure you are not using reserved word by your database engine for your key name.
Eg for MySQL : http://dev.mysql.com/doc/refman/5.6/en/reserved-words.html
Tip : primary
is reserved, so do not use it 😉