shareit/app/Mail/ItemAvailable.php

43 lines
847 B
PHP
Raw Normal View History

2018-09-15 05:09:07 +00:00
<?php
namespace App\Mail;
use \App\Item;
use Illuminate\Bus\Queueable;
use Illuminate\Mail\Mailable;
use Illuminate\Queue\SerializesModels;
use Illuminate\Contracts\Queue\ShouldQueue;
class ItemAvailable extends Mailable
{
public $item;
public $username;
use Queueable, SerializesModels;
/**
* Create a new message instance.
*
* @return void
*/
public function __construct($username, Item $item)
{
$this->item = $item;
$this->username = $username;
}
/**
* Build the message.
*
* @return $this
*/
public function build()
{
return $this->subject(
\Lang::getFromJson(
':itemname is available!',
['itemname' => $this->item->name]
)
)->markdown('emails.itemAvailable');
2018-09-15 05:09:07 +00:00
}
}