report = $report; } /** * Get the message envelope. */ public function envelope(): Envelope { return new Envelope( subject: sprintf('Report Not Found for project %s', $this->report->project->name) ); } /** * Get the message content definition. */ public function content(): Content { return new Content( markdown: 'emails.report-not-found', with: [ 'logoPath'=> resource_path('images/smartcane.png'), ], ); } /** * Get the attachments for the message. * * @return array */ public function attachments(): array { $path = ProjectLogger::getLogFileForToday($this->report->project); if ($path) { $filename = sprintf('%s_%s.log', $this->report->project->name, now()->format('Ymd')); return [ Attachment::fromPath($path) ->as($filename) ->withMime('text/plain'), ]; } return []; } }