Clean up extra code in notifications files.

This commit is contained in:
Daniel Meltzer
2020-05-23 14:56:56 -04:00
parent f0546bf689
commit 1e5d40f32e
21 changed files with 60 additions and 373 deletions
+3 -27
View File
@@ -29,10 +29,9 @@ class AuditNotification extends Notification
/**
* Get the notification's delivery channels.
*
* @param mixed $notifiable
* @return array
*/
public function via($notifiable)
public function via()
{
$notifyBy = [];
if (Setting::getSettings()->slack_endpoint) {
@@ -42,13 +41,13 @@ class AuditNotification extends Notification
return $notifyBy;
}
public function toSlack($notifiable)
public function toSlack()
{
return (new SlackMessage)
->success()
->content(class_basename(get_class($this->params['item'])) . " Audited")
->attachment(function ($attachment) use ($notifiable) {
->attachment(function ($attachment) {
$item = $this->params['item'];
$admin_user = $this->params['admin'];
$fields = [
@@ -61,27 +60,4 @@ class AuditNotification extends Notification
->fields($fields);
});
}
/**
* Get the mail representation of the notification.
*
* @param mixed $notifiable
* @return \Illuminate\Notifications\Messages\MailMessage
*/
public function toMail($notifiable)
{
}
/**
* Get the array representation of the notification.
*
* @param mixed $notifiable
* @return array
*/
public function toArray($notifiable)
{
return [
//
];
}
}