mirror of
				https://github.com/crater-invoice/crater.git
				synced 2025-10-30 13:11:08 -04:00 
			
		
		
		
	Add name in From field.
This commit is contained in:
		
							
								
								
									
										37
									
								
								app/Mail/InvoicePdf.php
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										37
									
								
								app/Mail/InvoicePdf.php
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,37 @@ | ||||
| <?php | ||||
| namespace Crater\Mail; | ||||
|  | ||||
| use Illuminate\Bus\Queueable; | ||||
| use Illuminate\Mail\Mailable; | ||||
| use Illuminate\Queue\SerializesModels; | ||||
| use Illuminate\Contracts\Queue\ShouldQueue; | ||||
|  | ||||
| class InvoicePdf extends Mailable | ||||
| { | ||||
|     use Queueable, SerializesModels; | ||||
|  | ||||
|     public $data = []; | ||||
|  | ||||
|     /** | ||||
|      * Create a new message instance. | ||||
|      * | ||||
|      * @return void | ||||
|      */ | ||||
|     public function __construct($data) | ||||
|     { | ||||
|         $this->data = $data; | ||||
|     } | ||||
|  | ||||
|     /** | ||||
|      * Build the message. | ||||
|      * | ||||
|      * @return $this | ||||
|      */ | ||||
|     public function build() | ||||
|     { | ||||
|         $company = $this->data['company']['name']; | ||||
|  | ||||
|         return $this->subject("Invoice from $company") | ||||
|                     ->markdown('emails.send.invoice', ['data', $this->data]); | ||||
|     } | ||||
| } | ||||
		Reference in New Issue
	
	Block a user