jeudi 28 novembre 2019

How to migrate Firebase dara to mysql data in laravel?

  foreach ($data as $userId => $userData) {
        if (isset($userData['is_anonymous']) && $userData['is_anonymous'] == false) {
            try {
                $user = AppUser::whereEmail($userData['email'])->first();
                if (!$user) {
                    $user = new AppUser();
                }
                $user->fill($userData);
                if (isset($userData['dwollaUrl'])) {
                    $user->dwolla_url = $userData['dwollaUrl'];
                    $parsedURL = parse_url($userData['dwollaUrl']);
                    $user->dwolla_id = str_replace("/customers/", "", $parsedURL['path']);
                }
                $user->dwolla_status = isset($userData['dwolla_acct_status']) ? $userData['dwolla_acct_status'] : null;
                // password pattern
                $user->password = Hash::make("ABC@".$userData['dob']);
                $user->save();
                $this->info("Created User For Fire-base Id : " . $userId);
                $this->info("MySQL Id For User : " . $user->id);

error :: [user_error] => Array to string conversion (SQL: insert into app_users

please help out!!! Thank you in Advance!!!



from Newest questions tagged laravel-5 - Stack Overflow https://ift.tt/2L3PrdE
via IFTTT

Aucun commentaire:

Enregistrer un commentaire