使用 nexmo 将 laravel 中的发件人名称从验证更改为我的公司名称

Change Sender Name from Verify to My company name in laravel using nexmo

我尝试将 nexom "verify" 提供的消息标题更改为我的公司名称。我升级了我的 nexmo 帐户并将钱存入其中。我尝试使用但不起作用。

这是我的通知

<?php

namespace App\Notifications;

use Illuminate\Bus\Queueable;
use Illuminate\Notifications\Notification;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Notifications\Messages\MailMessage;
use Illuminate\Notifications\Messages\NexmoMessage;
//use App\admin\Course;

class ConfirmedCourse extends Notification
{
    use Queueable;
    protected $course;

    /**
     * Create a new notification instance.
     *
     * @return void
     */
    public function __construct($course)
    {
     $this->course = $course;
    }

    /**
     * Get the notification's delivery channels.
     *
     * @param  mixed  $notifiable
     * @return array
     */
    public function via($notifiable)
    {
        return ['nexmo'];
    }

 public function toNexmo($notifiable)
    {
      try {
     $message = new NexmoMessage(); 
     $message->from('basma center')->content($this->course)
         ->unicode();
     return $message;
    }catch (\Exception $e) {
    $e->getMessage();
    }
 }  
}

请问我该如何解决这个问题?? 提前致谢

查看来自 Laravel 的代码,我相信您所做的是正确的,因为看起来他们通过了您的 "from" 设置通知堆栈。我唯一能想到的可能是国家限制,因为不同的国家对发件人数据有不同的 SMS 要求。

您可能需要检查 Country Specific Features and Recommendations 列表以查看运营商是否覆盖了这一点。

另请记住,Laravel 通知是纯粹的短信,它们不是我们的 Verify 产品。您可以将原始 SMS 设置为 "from" 选项的内容受到更多限制(请参阅上面的国家/地区限制)。