mirror of
https://github.com/Bubka/2FAuth.git
synced 2024-11-29 11:43:26 +01:00
35 lines
699 B
PHP
35 lines
699 B
PHP
<?php
|
|
|
|
namespace App\Listeners;
|
|
|
|
use Illuminate\Notifications\Events\NotificationSent;
|
|
use Illuminate\Support\Facades\Log;
|
|
|
|
class LogNotification
|
|
{
|
|
/**
|
|
* Create the event listener.
|
|
*
|
|
* @return void
|
|
*/
|
|
public function __construct()
|
|
{
|
|
//
|
|
}
|
|
|
|
/**
|
|
* Handle the event.
|
|
*
|
|
* @return void
|
|
*/
|
|
public function handle(NotificationSent $event)
|
|
{
|
|
// $event->channel
|
|
// $event->notifiable
|
|
// $event->notification
|
|
// $event->response
|
|
|
|
Log::info(sprintf('Notification of type %s sent via channel %s to user ID #%s', get_class($event->notification), $event->channel, $event->notifiable->id));
|
|
}
|
|
}
|