You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have emailverified, firstcontribution and so on badges.
now i want to show modal like thing to notify users whenever they earned any badge..
`<?php
namespace App\Notifications;
use Illuminate\Bus\Queueable;
use Illuminate\Notifications\Notification;
class BadgeEarned extends Notification
{
use Queueable;
protected $badge;
/**
* Create a new notification instance.
*
* @return void
*/
public function __construct($badge)
{
$this->badge = $badge;
}
/**
* Get the notification's delivery channels.
*
* @param mixed $notifiable
* @return array
*/
public function via($notifiable)
{
return ['database'];
}
/**
* Get the array representation of the notification.
*
* @param mixed $notifiable
* @return array
*/
public function toArray($notifiable)
{
return [
'message' => 'You have earned ' . ${$this->badge->getName()} . ' badge.'
];
}
}
`
i have created notification, bt i couldnt find proper place to fire this notification because its generic notification whenever any badge is earned i want to show modal using vue for database notification.
The text was updated successfully, but these errors were encountered:
I have emailverified, firstcontribution and so on badges.
now i want to show modal like thing to notify users whenever they earned any badge..
`<?php
namespace App\Notifications;
use Illuminate\Bus\Queueable;
use Illuminate\Notifications\Notification;
class BadgeEarned extends Notification
{
use Queueable;
}
`
i have created notification, bt i couldnt find proper place to fire this notification because its generic notification whenever any badge is earned i want to show modal using vue for database notification.
The text was updated successfully, but these errors were encountered: