芝麻web文件管理V1.00
编辑当前文件:/home/digitalh/yeahea.digitalhubbd.com/app/Notifications/Dispute/Created.php
dispute = $dispute; } /** * Get the notification's delivery channels. * * @param mixed $notifiable * @return array */ public function via($notifiable) { if ($this->dispute->order->device_id !== null) { HasNotifications::pushNotification(self::toArray($notifiable)); } return ['mail', 'database']; } /** * Get the mail representation of the notification. * * @param mixed $notifiable * @return \Illuminate\Notifications\Messages\MailMessage */ public function toMail($notifiable) { return (new MailMessage) ->from(get_sender_email(), get_sender_name()) ->subject(trans('notifications.dispute_created.subject', [ 'order_id' => $this->dispute->order->order_number ])) ->markdown('admin.mail.dispute.created', [ 'url' => route('admin.support.dispute.show', $this->dispute->id), 'dispute' => $this->dispute ]); } /** * Get the array representation of the notification. * * @param mixed $notifiable * @return array */ public function toArray($notifiable) { return [ 'id' => $this->dispute->id, 'device_id' => $this->dispute->order->device_id, 'status' => $this->dispute->statusName(), 'customer' => $this->dispute->customer->getName(), 'category' => $this->dispute->dispute_type->detail, 'order_number' => $this->dispute->order->order_number, 'subject' => trans('notifications.dispute_created.subject', [ 'order_id' => $this->dispute->order->order_number ]), 'message' => trans('notifications.dispute_created.message', [ 'order_id' => $this->dispute->order->order_number ]), ]; } }