This commit is contained in:
baodev0
2026-09-23 15:17:18 +07:00
parent cd38c5d6d0
commit 82a71244ca
107 changed files with 3332 additions and 3306 deletions
+40
View File
@@ -0,0 +1,40 @@
<?php
namespace App\Mail\Customer;
use App\Mail\Concerns\RequiresDbTemplate;
use Illuminate\Bus\Queueable;
use Illuminate\Mail\Mailable;
use Illuminate\Mail\Mailables\Content;
use Illuminate\Mail\Mailables\Envelope;
use Illuminate\Queue\SerializesModels;
class PasswordResetLink extends Mailable
{
use Queueable, SerializesModels, RequiresDbTemplate;
public function __construct(public array $data) {}
public function envelope(): Envelope
{
return new Envelope(
subject: $this->renderFromTemplate('customer_password_reset_link', $this->vars())['subject'],
);
}
public function content(): Content
{
return new Content(
htmlString: $this->renderFromTemplate('customer_password_reset_link', $this->vars())['html'],
);
}
private function vars(): array
{
return [
'full_name' => $this->data['fullname'] ?? 'Quý khách',
'reset_url' => $this->data['reset_url'] ?? '',
'expire_minutes' => (string) config('auth.passwords.users.expire', 60),
];
}
}