. */ namespace App\Mail; class NewTrack extends BaseNotification { /** * @inheritdoc */ public function build() { $creatorName = $this->initiatingUser->display_name; $trackTitle = $this->activityRecord->resource->title; return $this->renderEmail( 'new-track', "{$creatorName} published \"{$trackTitle}\"!", [ 'creatorName' => $creatorName, 'trackTitle' => $trackTitle, 'genreTitle' => $this->activityRecord->resource->genre->name ]); } }