2018-09-15 05:33:21 +00:00
|
|
|
<?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;
|
2018-09-15 05:33:21 +00:00
|
|
|
|
|
|
|
class UserWaiting extends Mailable
|
|
|
|
{
|
|
|
|
public $item;
|
|
|
|
public $waitingUser;
|
2021-05-20 23:37:35 +00:00
|
|
|
public $userWithItem;
|
2018-09-15 05:33:21 +00:00
|
|
|
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()
|
|
|
|
{
|
2018-09-27 16:00:03 +00:00
|
|
|
return $this->subject(
|
2021-05-21 00:04:35 +00:00
|
|
|
Lang::get(
|
2021-05-20 23:37:35 +00:00
|
|
|
':waitinguser wants to use :itemname',
|
2018-09-27 16:00:03 +00:00
|
|
|
[
|
2021-05-20 23:37:35 +00:00
|
|
|
'waitinguser' => $this->waitingUser,
|
2018-09-27 16:00:03 +00:00
|
|
|
'itemname' => $this->item->name
|
|
|
|
]
|
|
|
|
)
|
|
|
|
)->markdown('emails.userWaiting');
|
2018-09-15 05:33:21 +00:00
|
|
|
}
|
|
|
|
}
|