File: /home/imensosw/www/mpl.imenso.co/app/Listeners/RemoveFanFriendRequestedYouNotification.php
<?php
namespace App\Listeners;
use App\Events\FanFriendRequestsFan;
use App\Events\FanUnfriendRequestsFan;
use App\Models\Notification;
class RemoveFanFriendRequestedYouNotification
{
/**
* Create the event listener.
*
* @return void
*/
public function __construct()
{
//
}
/**
* Handle the event.
*
* @param FanFriendRequestsFan $event
* @return void
*/
public function handle(FanUnfriendRequestsFan $event)
{
//Remove notification attached to requestee
$event->requestee->removeNotification(
301, [
'requester_id' => $event->requester->id,
]
);
}
}