public function handle(Event $event) { $manager = new NotificationManager(); $notificationType = $event->name; $manager->setNotificationType($notificationType); $manager->setUser($event->args[0]); if (isset($event->args[1])) { $notificationObject = $event->args[1]; $manager->setNotificationObject($notificationObject); } if (isset($event->args[1])) { $time = $event->args[2]; $manager->add($time); } }