ничего не происходит тоесть ни ошибок ничего на счете тестовые 1,9 евро есть
1)установил
composer require laravel/nexmo-notification-channel nexmo/laravel
2)Next, you will need to add a nexmo configuration entry to your config/services.php configuration file. You may copy the example configuration below to get started:
'nexmo' => [
'sms_from' => '15556666666',
],
3)в .ENV ключи правильные
NEXMO_KEY=key
NEXMO_SECRET=pass
<?php
namespace App\Notifications;
use Illuminate\Bus\Queueable;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Notifications\Messages\MailMessage;
use Illuminate\Notifications\Notification;
class PageSMSNotification extends Notification {
use Queueable;
public $page;
/**
* Create a new notification instance.
*
* @return void
*/
public function __construct($page)
{
$this->page = $page;
}
/**
* Get the notification's delivery channels.
*
* @param mixed $notifiable
* @return array
*/
public function via($notifiable) {
return ['nexmo'];
}
/**
* Получить представления уведомления в виде Nexmo / SMS.
*
* @param mixed $notifiable
* @return NexmoMessage
*/
public function toNexmo($notifiable) {
return (new NexmoMessage)
->content('Добавлена новая страница ' . $this->page->title);
}
}
//run Notification
<?php
namespace App\Observers;
use App\Models\Page;
use App\Models\User;
use Auth;
use Illuminate\Support\Facades\Notification;
use App\Notifications\PageEmailNotification;
use App\Notifications\PageSMSNotification;
class PageObserver
{
public function created(Page $page)
{
Notification::send(Auth::user(), new PageSMSNotification($page));
}
}