From eb1d07c849fee750e4cacba969490a72e88211ae Mon Sep 17 00:00:00 2001 From: Jack Date: Wed, 23 Feb 2022 09:04:40 -0600 Subject: [PATCH] Unsupported operand types on rollback migration (#362) When trying to rollback the migrations i got this error TypeError Unsupported operand types: array + bool This commit solves the issue. --- ...4_10_12_200000_add_two_factor_columns_to_users_table.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/database/migrations/2014_10_12_200000_add_two_factor_columns_to_users_table.php b/database/migrations/2014_10_12_200000_add_two_factor_columns_to_users_table.php index 749b5213..6acbf7b6 100644 --- a/database/migrations/2014_10_12_200000_add_two_factor_columns_to_users_table.php +++ b/database/migrations/2014_10_12_200000_add_two_factor_columns_to_users_table.php @@ -39,12 +39,12 @@ public function up() public function down() { Schema::table('users', function (Blueprint $table) { - $table->dropColumn([ + $table->dropColumn(array_merge([ 'two_factor_secret', 'two_factor_recovery_codes', - ] + Fortify::confirmsTwoFactorAuthentication() ? [ + ], Fortify::confirmsTwoFactorAuthentication() ? [ 'two_factor_confirmed_at', - ] : []); + ] : [])); }); } };