First and foremost, I’m learning yii2. Here is my question, is anyone here comfortably using the yii2 tuyakhov notification extension? If so, i could use some help as i’m having a hard time setting it up. below is my code and the preceding error
$notfication_text = 'New payment Received.';
Yii::$app->Kiduchi->save_notification($_POST['client_id'], $notfication_text);
//notifier instance
$recipients = $_POST['client_id'];
$notifications = 'New payment Received.';
$notifier = new \tuyakhov\notifications\Notifier([
'channels' => ['mail'],
]);
$notifier->send($_POST['client_id'], 'New payment Received.');
//send mail notification
$recipient = KfUsers::find()->select('email')->where(['id' => $_POST['client_id']])->one();
$notification = new InvoicePaid($invoice);
I’m getting this error:- [error][yii\base\ErrorException:1] exception ‘yii\base\ErrorException’ with message ‘Call to a member function viaChannels() on string’ in C:\wamp64\www\sites\kf_development\vendor\tuyakhov\yii2-notifications\src\Notifier.php:89
Since am still learning the yii2 framework, i am not sure in which directory to put the Notification class any help on this is appreciated. Thanks in advance