rfpDetails = $rfpDetails; } /** * Get the message envelope. * * @return \Illuminate\Mail\Mailables\Envelope */ public function envelope(): Envelope { // Assuming 'category' is a human-readable string like "Urban Planning" $title = isset($this->rfpDetails['formLabel']) ? $this->rfpDetails['formLabel'] : 'New Submission'; // Craft a more engaging and personalized email subject $subject = "We got a new request | {$title} "; return new Envelope( subject: $subject, ); } /** * Get the message content definition. * * @return \Illuminate\Mail\Mailables\Content */ public function content(): Content { return new Content( // Make sure 'emails.rfp-submitted' points to an actual Blade view file at resources/views/emails/rfp-submitted.blade.php view: 'emails.rfp-submitted', with: ['rfpDetails' => $this->rfpDetails], // Pass the RFP details to the view ); } /** * Define attachments for the message, if needed. * * @return array */ public function attachments(): array { // Example: Attach a file from storage // return [new Attachment(storage_path('path/to/your/file.pdf'), 'Filename.pdf')]; return []; // Return an empty array if no attachments are needed } }