osb/app/Mail/Test.php

42 lines
602 B
PHP

<?php
namespace App\Mail;
use Illuminate\Bus\Queueable;
use Illuminate\Mail\Mailable;
use Illuminate\Queue\SerializesModels;
use App\Models\User;
class Test extends Mailable
{
use Queueable, SerializesModels;
public User $user;
/**
* Create a new message instance.
*
* @return void
*/
public function __construct(User $o)
{
$this->user = $o;
}
/**
* Build the message.
*
* @return $this
*/
public function build()
{
return $this
->markdown('mail.test')
->subject('Just a test...')
->with([
'site'=>$this->user->site,
'user'=>$this->user,
]);
}
}