<?php

namespace App\Notifications\Concerns;

use Illuminate\Notifications\Messages\MailMessage;

trait BuildsMailMessage
{
    protected function mailMessage(string $subject, string $view, array $data = []): MailMessage
    {
        return (new MailMessage)
            ->subject($subject)
            ->markdown($view, array_merge([
                'logoPath' => config('mail.logo_path'),
            ], $data));
    }
}
