How can I set a unique constraints on two columns?
class MyModel extends Migration { public function up() { Schema::create(\'storage_trackers\', fun
The second param is to manually set the name of the unique index. Use an array as the first param to create a unique key across multiple columns.
$table->unique(array('mytext', 'user_id'));
or (a little neater)
$table->unique(['mytext', 'user_id']);