unique 2 columns laravel migrations code example Example: laravel unique multiple columns $table->unique(['mytext', 'user_id']);