@@ -1,6 +1,6 @@ |
||
1 | 1 | <?php |
2 | 2 | |
3 | -Route::group(['middleware' => ['web'], 'namespace' => '\Thecodework\TwoFactorAuthentication\Http\Controllers'], function () { |
|
3 | +Route::group(['middleware' => ['web'], 'namespace' => '\Thecodework\TwoFactorAuthentication\Http\Controllers'], function() { |
|
4 | 4 | Route::get('verify-2fa', 'TwoFactorAuthenticationController@verifyTwoFactorAuthentication'); |
5 | 5 | Route::post('verify-2fa', 'TwoFactorAuthenticationController@verifyToken'); |
6 | 6 | Route::get('setup-2fa', 'TwoFactorAuthenticationController@setupTwoFactorAuthentication'); |
@@ -58,7 +58,7 @@ |
||
58 | 58 | ]; |
59 | 59 | |
60 | 60 | // Impllicitly adding an validation rule to check if token is valid or not. |
61 | - Validator::extendImplicit('valid_token', function ($attribute, $value, $parameters, $validator) { |
|
61 | + Validator::extendImplicit('valid_token', function($attribute, $value, $parameters, $validator) { |
|
62 | 62 | $totp = new TOTP( |
63 | 63 | config('2fa-config.account_name'), |
64 | 64 | $this->user->secret_key |
@@ -13,7 +13,7 @@ discard block |
||
13 | 13 | */ |
14 | 14 | public function up() |
15 | 15 | { |
16 | - Schema::table('users', function (Blueprint $table) { |
|
16 | + Schema::table('users', function(Blueprint $table) { |
|
17 | 17 | $table->smallInteger('is_2fa_enabled')->default(0)->before('create_at'); |
18 | 18 | $table->string('secret_key')->nullable()->after('is_2fa_enabled'); |
19 | 19 | }); |
@@ -26,7 +26,7 @@ discard block |
||
26 | 26 | */ |
27 | 27 | public function down() |
28 | 28 | { |
29 | - Schema::table('users', function (Blueprint $table) { |
|
29 | + Schema::table('users', function(Blueprint $table) { |
|
30 | 30 | $table->dropColumn('is_2fa_enabled'); |
31 | 31 | $table->dropColumn('secret_key'); |
32 | 32 | }); |