芝麻web文件管理V1.00
编辑当前文件:/home/qrafawbu/qrafiqxcreativeagency.com/accounts/office/app/Notifications/SubTaskAssigneeAdded.php
subTask = $subTask; $this->company = $this->subTask->task->company; $this->emailSetting = EmailNotificationSetting::where('company_id', $this->company->id)->where('slug', 'user-assign-to-task')->first(); } /** * Get the notification's delivery channels. * * @param mixed $notifiable * @return array */ //phpcs:ignore public function via($notifiable) { $via = ['database']; if ($this->emailSetting->send_email == 'yes' && $notifiable->email_notifications && $notifiable->email != '') { array_push($via, 'mail'); } return $via; } public function toMail($notifiable): MailMessage { $build = parent::build(); $url = route('tasks.show', [$this->subTask->task->id, 'view' => 'sub_task']); $url = getDomainSpecificUrl($url, $this->company); $content = $this->subTask->title . ' ' . __('email.subTaskAssigneeAdded.subject') . '.' . '
' . ((!is_null($this->subTask->task->project)) ? __('app.project') . ' - ' . $this->subTask->task->project->project_name : '') . '
'; return $build ->subject(__('email.subTaskAssigneeAdded.subject') . ' - ' . config('app.name') . '.') ->markdown('mail.email', [ 'url' => $url, 'content' => $content, 'themeColor' => $this->company->header_color, 'actionText' => __('email.subTaskAssigneeAdded.action'), 'notifiableName' => $notifiable->name ]); } /** * Get the array representation of the notification. * * @param mixed $notifiable * @return array */ //phpcs:ignore public function toArray($notifiable) { return [ 'id' => $this->subTask->task->id, 'created_at' => $this->subTask->created_at->format('Y-m-d H:i:s'), 'heading' => $this->subTask->title ]; } }