mirror of
				https://github.com/crater-invoice/crater.git
				synced 2025-10-31 05:31:10 -04:00 
			
		
		
		
	v6 update
This commit is contained in:
		| @ -7,6 +7,7 @@ use Crater\Models\Payment; | ||||
| use Illuminate\Bus\Queueable; | ||||
| use Illuminate\Mail\Mailable; | ||||
| use Illuminate\Queue\SerializesModels; | ||||
| use Vinkla\Hashids\Facades\Hashids; | ||||
|  | ||||
| class SendPaymentMail extends Mailable | ||||
| { | ||||
| @ -32,7 +33,7 @@ class SendPaymentMail extends Mailable | ||||
|      */ | ||||
|     public function build() | ||||
|     { | ||||
|         EmailLog::create([ | ||||
|         $log = EmailLog::create([ | ||||
|             'from' => $this->data['from'], | ||||
|             'to' => $this->data['to'], | ||||
|             'subject' => $this->data['subject'], | ||||
| @ -41,6 +42,11 @@ class SendPaymentMail extends Mailable | ||||
|             'mailable_id' => $this->data['payment']['id'], | ||||
|         ]); | ||||
|  | ||||
|         $log->token = Hashids::connection(EmailLog::class)->encode($log->id); | ||||
|         $log->save(); | ||||
|  | ||||
|         $this->data['url'] = route('payment', ['email_log' => $log->token]); | ||||
|  | ||||
|         $mailContent = $this->from($this->data['from'], config('mail.from.name')) | ||||
|                     ->subject($this->data['subject']) | ||||
|                     ->markdown('emails.send.payment', ['data', $this->data]); | ||||
|  | ||||
		Reference in New Issue
	
	Block a user