芝麻web文件管理V1.00
编辑当前文件:/home/sditechnicalteam/public_html/app/Notifications/FileUpload.php
file = $file; $this->project = Project::findOrFail($this->file->project_id); $this->company = $this->file->project->company; $this->emailSetting = EmailNotificationSetting::where('company_id', $this->company->id)->where('slug', 'employee-assign-to-project')->first(); } /** * Get the notification's delivery channels. * * @param mixed $notifiable * @return array */ public function via($notifiable) { $via = []; if ($this->emailSetting->send_email == 'yes' && $notifiable->email_notifications && $notifiable->email != '') { array_push($via, 'mail'); } return $via; } /** * Get the mail representation of the notification. * * @param mixed $notifiable * @return MailMessage */ public function toMail($notifiable): MailMessage { $url = route('projects.show', [$this->project->id, 'tab' => 'files']); $url = getDomainSpecificUrl($url, $this->company); return parent::build() ->subject(__('email.fileUpload.subject') . ' ' . $this->project->project_name . ' - ' . config('app.name')) ->greeting(__('email.hello') . ' ' . mb_ucwords($notifiable->name) . ',') ->line(__('email.fileUpload.subject') . mb_ucwords($this->project->project_name)) ->line(__('modules.projects.fileName') . ' - ' . $this->file->filename) ->line(__('app.date') . ' - ' . $this->file->created_at->format($this->company->date_format)) ->action(__('email.fileUpload.action'), $url) ->line(__('email.thankyouNote')); } /** * Get the array representation of the notification. * * @param mixed $notifiable * @return array */ //phpcs:ignore public function toArray($notifiable) { return [ // ]; } }