for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace Illuminate\Notifications\Messages;
class MailMessage extends SimpleMessage
{
/**
* The view for the message.
*
* @var string
*/
public $view = 'notifications::email';
* The view data for the message.
* @var array
public $viewData = [];
* The attachments for the message.
public $attachments = [];
* The raw attachments for the message.
public $rawAttachments = [];
* Set the view for the mail message.
* @param string $view
* @param array $data
* @return $this
public function view($view, array $data = [])
$this->view = $view;
$this->viewData = $data;
return $this;
}
* Attach a file to the message.
* @param string $file
* @param array $options
public function attach($file, array $options = [])
$this->attachments[] = compact('file', 'options');
* Attach in-memory data as an attachment.
* @param string $data
* @param string $name
public function attachData($data, $name, array $options = [])
$this->rawAttachments[] = compact('data', 'name', 'options');
* Get the data array for the mail message.
* @return array
public function data()
return array_merge($this->toArray(), $this->viewData);