<?php

namespace App\Listeners;

use App\Events\AdminUserCreatedEvent;
use App\Events\AdminUserResetPwdEvent;
use App\Jobs\SendEasySms;

class SendPwdToAdminUserListener
{
    public function __construct()
    {
    }

    public function handle(AdminUserCreatedEvent|AdminUserResetPwdEvent $event)
    {
        $mobile = $event->mobile;
        $pwd = $event->password;
        $remark = $event->remark;
        SendEasySms::dispatch($mobile,['code'=>000000,'message'=>$remark.$pwd.'【友福健康】'])->onQueue('health');
    }
}
