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
@@ -31,7 +31,6 @@ class CheckinAccessoryNotification extends Notification
/**
* Get the notification's delivery channels.
*
* @param mixed $notifiable
* @return array
*/
public function via()
@@ -65,14 +64,11 @@ class CheckinAccessoryNotification extends Notification
$note = $this->note;
$botname = ($this->settings->slack_botname) ? $this->settings->slack_botname : 'Snipe-Bot' ;
$fields = [
'To' => '<'.$target->present()->viewUrl().'|'.$target->present()->fullName().'>',
'By' => '<'.$admin->present()->viewUrl().'|'.$admin->present()->fullName().'>',
];
return (new SlackMessage)
->content(':arrow_down: :keyboard: Accessory Checked In')
->from($botname)
@@ -88,10 +84,8 @@ class CheckinAccessoryNotification extends Notification
* @param mixed $notifiable
* @return \Illuminate\Notifications\Messages\MailMessage
*/
public function toMail($notifiable)
public function toMail()
{
return (new MailMessage)->markdown('notifications.markdown.checkin-accessory',
[
'item' => $this->item,
@@ -102,17 +96,4 @@ class CheckinAccessoryNotification extends Notification
->subject('Accessory checked in');
}
/**
* Get the array representation of the notification.
*
* @param mixed $notifiable
* @return array
*/
public function toArray($notifiable)
{
return [
//
];
}
}