shareit/app/Mail/UserWaiting.php

48 lines
1004 B
PHP
Raw Normal View History

<?php
namespace App\Mail;
use \App\Item;
use Illuminate\Bus\Queueable;
use Illuminate\Mail\Mailable;
use Illuminate\Queue\SerializesModels;
2021-05-20 23:37:35 +00:00
use Lang;
class UserWaiting extends Mailable
{
public $item;
public $waitingUser;
2021-05-20 23:37:35 +00:00
public $userWithItem;
use Queueable, SerializesModels;
/**
* Create a new message instance.
*
* @return void
*/
public function __construct($waitingUser, $userWithItem, Item $item)
{
$this->item = $item;
$this->waitingUser = $waitingUser;
$this->userWithItem = $userWithItem;
}
/**
* Build the message.
*
* @return $this
*/
public function build()
{
return $this->subject(
Lang::get(
2021-05-20 23:37:35 +00:00
':waitinguser wants to use :itemname',
[
2021-05-20 23:37:35 +00:00
'waitinguser' => $this->waitingUser,
'itemname' => $this->item->name
]
)
)->markdown('emails.userWaiting');
}
}