mirror of
https://git.meshkee.com/cssd/cssd-back.git
synced 2026-10-12 13:11:04 +03:30
add rahyab notification service
This commit is contained in:
@@ -4,10 +4,11 @@ namespace Packages\Auth;
|
||||
|
||||
use App\Http\Controllers\Api\Auth\LoginController;
|
||||
use App\Models\User;
|
||||
use App\Services\Notification\SmsNotification;
|
||||
use Carbon\Carbon;
|
||||
use Illuminate\Http\Request;
|
||||
use Packages\Messaging\src\Facades\MessageResponse;
|
||||
use Packages\SMSSender\SMSSender;
|
||||
// use Packages\SMSSender\SMSSender;
|
||||
|
||||
trait SendsPasswordResetEmails
|
||||
{
|
||||
@@ -61,7 +62,13 @@ trait SendsPasswordResetEmails
|
||||
if ($user) {
|
||||
$code = rand(100000, 999999);
|
||||
\Cache::put($code, $user->id, Carbon::now()->addMinutes(30));
|
||||
SMSSender::instance()->patternSend($request->cell_number, 'jqomyn42wo', ["verification-code" => $code]);
|
||||
SmsNotification::to( $user )->isSystematic()->send(
|
||||
trans( 'sms.reset_password' , [
|
||||
'activation_code' => $code
|
||||
] ) ,
|
||||
'service'
|
||||
);
|
||||
// SMSSender::instance()->patternSend($request->cell_number, 'jqomyn42wo', ["verification-code" => $code]);
|
||||
return MessageResponse::success('Send Disposable Password');
|
||||
}
|
||||
return MessageResponse::error('User Not Found');
|
||||
|
||||
Reference in New Issue
Block a user