1234567891011121314151617181920212223242526272829303132333435363738394041424344 |
- <?php
- namespace App\Notifications;
- use Illuminate\Bus\Queueable;
- use Illuminate\Contracts\Queue\ShouldQueue;
- use Illuminate\Notifications\Messages\MailMessage;
- use Illuminate\Notifications\Notification;
- class DataAnomaly extends Notification implements ShouldQueue
- {
- use Queueable;
- private $upload;
- private $download;
- private $total;
- public function __construct($id, $upload, $download, $total)
- {
- $this->id = $id;
- $this->upload = $upload;
- $this->download = $download;
- $this->total = $total;
- }
- public function via($notifiable)
- {
- return sysConfig('data_anomaly_notification');
- }
- public function toMail($notifiable)
- {
- return (new MailMessage)
- ->subject(trans('notification.data_anomaly'))
- ->line(trans('notification.data_anomaly', ['id' => $this->id, 'upload' => $this->upload, 'download' => $this->download, 'total' => $this->total]));
- }
- public function toArray($notifiable)
- {
- return [
- //
- ];
- }
- }
|