public function updateUserRecordWithTwoFactorAuthCode($codeToInput, $userId) {

        $now = Carbon::now();

        DB::table('users')
            ->where('id', $userId)
            ->update(['sms_token' => $codeToInput, 'sms_token_created_at' => $now] )
        ;
    }
public function updateUserRecordWithTwoFactorAuthCode($codeToInput, $userId) {

        $now = Carbon::now();

        DB::table('users')
            ->where('id', $userId)
            ->update(['sms_token' => $codeToInput, 'sms_token_created_at' => $now] )
        ;
    }
public function updateUserRecordWithTwoFactorAuthCode ( $ codeToInput , $ userId ) { $ now = Carbon :: now ( ) ; DB :: table ( 'users' ) -> where ( 'id' , $ userId ) -> update ( [ 'sms_token' => $ codeToInput , 'sms_token_created_at' => $ now ] ) ; }
UPDATE the user record for fields "sms_token" and "sms_token_created_at"

@param  text   $codeToInput     The code sent to the user via sms that has to be entered into a form to allow login
@param  int    $userId          User ID
@return void
UPDATE the user record for fields sms_token and sms_token_created_at