mirror of
				https://github.com/brunofontes/shareit.git
				synced 2025-10-28 08:51:06 -03:00 
			
		
		
		
	As the other email notification, the Laravel upgrade were not correctly implemented leading to an unchanged getFromJson to get for the language.
		
			
				
	
	
		
			42 lines
		
	
	
		
			794 B
		
	
	
	
		
			PHP
		
	
	
	
	
	
			
		
		
	
	
			42 lines
		
	
	
		
			794 B
		
	
	
	
		
			PHP
		
	
	
	
	
	
| <?php
 | |
| 
 | |
| namespace App\Mail;
 | |
| 
 | |
| use \App\Item;
 | |
| use Illuminate\Bus\Queueable;
 | |
| use Illuminate\Mail\Mailable;
 | |
| use Illuminate\Queue\SerializesModels;
 | |
| 
 | |
| 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::get(
 | |
|                 ':itemname is available!',
 | |
|                 ['itemname' => $this->item->name]
 | |
|             )
 | |
|         )->markdown('emails.itemAvailable');
 | |
|     }
 | |
| }
 |