diff --git a/app/Services/Notification/Batch/PeerToPeer.php b/app/Services/Notification/Batch/PeerToPeer.php index 5fe6fc40..84638459 100644 --- a/app/Services/Notification/Batch/PeerToPeer.php +++ b/app/Services/Notification/Batch/PeerToPeer.php @@ -102,7 +102,6 @@ class PeerToPeer protected function prepareData(Model $model, $userData): array { $fillable = is_null($userData) ? $model : $userData; - return [ 'ClientID' => rand(1, 1000000000000000), 'ShortCode' => $this->findFrom(), diff --git a/packages/Auth/SendsPasswordResetEmails.php b/packages/Auth/SendsPasswordResetEmails.php index aa061a91..215fdd3b 100644 --- a/packages/Auth/SendsPasswordResetEmails.php +++ b/packages/Auth/SendsPasswordResetEmails.php @@ -58,15 +58,16 @@ trait SendsPasswordResetEmails protected function generateAndSendCode($request) { - $user = User::where('cell_number', $request->cell_number)->where('status', 'Active')->first(); + $userModel = User::where('cell_number', $request->cell_number)->where('status', 'Active'); + $user = $userModel->first(); if ($user) { $code = rand(100000, 999999); \Cache::put($code, $user->id, Carbon::now()->addMinutes(30)); - SmsNotification::to( $user )->isSystematic()->send( + SmsNotification::to( $userModel )->isSystematic()->send( trans( 'sms.reset_password' , [ 'activation_code' => $code ] ) , - 'service' + 'rahyab_service' ); // SMSSender::instance()->patternSend($request->cell_number, 'jqomyn42wo', ["verification-code" => $code]); return MessageResponse::success('Send Disposable Password');