mirror of
https://github.com/brunofontes/shareit.git
synced 2024-11-27 21:31:27 +00:00
Bruno Fontes
82a8bcb7a2
I was using "\App::setLocale" on code, but it was annoind me. So I included the "use App" and now I am colling directly the "App::setLocale".
49 lines
1.0 KiB
PHP
49 lines
1.0 KiB
PHP
<?php
|
|
|
|
namespace App\Mail;
|
|
|
|
use Lang;
|
|
use \App\Item;
|
|
use Illuminate\Bus\Queueable;
|
|
use Illuminate\Mail\Mailable;
|
|
use Illuminate\Queue\SerializesModels;
|
|
use Illuminate\Contracts\Queue\ShouldQueue;
|
|
|
|
class UserWaiting extends Mailable
|
|
{
|
|
public $item;
|
|
public $waitingUser;
|
|
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::getFromJson(
|
|
':waitinguser wants to use :itemname',
|
|
[
|
|
'waitinguser' => $this->waitingUser,
|
|
'itemname' => $this->item->name
|
|
]
|
|
)
|
|
)->markdown('emails.userWaiting');
|
|
}
|
|
}
|