<?php

namespace App\Mail;

use Illuminate\Bus\Queueable;
use Illuminate\Mail\Mailable;
use Illuminate\Queue\SerializesModels;

class BalanceCreditedMail extends Mailable
{
    use Queueable, SerializesModels;

    public $data;

    public function __construct($data)
    {
        $this->data = $data;
    }

    public function build()
    {
return $this->from(config('mail.from.address'), config('mail.from.name'))
            ->subject('Account Credited | For Life Pro LLC')
            ->view('emails.creditEmail')
            ->with(['data' => $this->data]);

    }
}
